Favourites - linked hearts


I’m new to Axure and am trying to make a favourites list. I have gotten so far with some great help from @vaexperience but have gotten a bit stuck!

Here’s what I’m trying to do: https://re3wys.axshare.com/#id=xiu944&p=page_1

I can do:

  1. Select heart to add from my subject list repeater to my favourites repeater.
  2. Unselect the heart to remove it from the favourites.
  3. Click on the Remove Fav button (blue) to also remove it from the favourites.

So far so good.
But what I’d like is that when I press the blue button to remove it from the favourites the heart should return to it’s original state (disabled - grey outline).

Any help would be greatly appreciated.

Thanks so much. Ian

You need to use an Update Row action to go into your first repeater and change the column which controls whether your favourite hearts are set to their favourite state or not.

You’ll also need a way to identify which row to update. You can do this by matching the value (i.e. ‘Art’) on the fave panel with cell in your repeater which sets the row name. Something like [[Item.RowName==FaveName]] where ‘FaveName’ is a local variable you set when the Remove Fave button is clicked.

Thanks very much for your suggestions Dave. I’ve spent a couple of days trying to go through the steps but I keep going around in circles!
The Update Row feature is brilliant and I’ve had some fun playing around with that.
What is stumping me though I think is the local variable. I’ve not used these yet and am struggling to get to grips with it :confused:

Do you have time to put together an RP file I could download to have a look at the steps you would take? It would be a great help in figuring it out!

The other thing I am stumbling on when using the Update Row option is I can’t seem to do it with a select/un-select button. I’ve had to create two buttons - one to update the row and another to remove/change the update. I expect just a newbie problem!

Thanks again. Ian

If you add your Axure file to this thread, I’d happily take a look over a lunchtime :slight_smile:

That would be great - thank you!
Here are a couple I have been working on to try and get the same effect. The second attachment requires the long press to delete the row from the fav repeater. But I’d rather just have a single press for adding and removing a favourite.

Thanks for your time. Ian

Favourites test 1.rp (54.2 KB)

Favourites test 2.rp (58.9 KB)

Hey there, sorry for the delay, I didn’t get a clear lunchbreak for a few days :slight_smile:

So you had a few things going on here - you were setting the states of the various widgets inside each repeater row on the widgets themselves, rather than on the repeater as a whole. You can do this, but it makes things like cases very difficult to apply. It’s easier to load the states of everything on the repeater widget as a whole using the ‘On Item Load’ interaction. That will run through each row of the repeater and set the states one after the other. This allows you to add cases which will load states in different ways according to values in the repeater table, which is what allows states to persist between repeater loads.

I’ve then added a simple check when you click the ‘Remove fav’ button - it checks each row in the target repeater to see if it matches the row you’re removing, then if it does, it changes the value of the repeater column for ‘Selected’ to ‘No’. Then when the repeater refreshes, it will unselect the heart.

I’ve also swapped out the heart images you were using for a font-based icon, as this allows you to apply simpler selected, hover and unselected styles rather than switching images.

Take a look and let me know if you have any questions.

Favourites test 1-updated.rp (56.6 KB)