Saved / favorited items: Can I make updated repeater rows permanent?

repeater-widget

#1

Help! When I return to a page, all of the updated repeater states reset! I’m working on a feature that would allow a user to “favorite” something in a set of results, and then see those favorited items when they return to that page. For an example, on Target’s website if you are searching for teapots and you favorite or save one, it will show up with a filled-in heart every time it appears in your search results. Is there any way to accomplish this in a repeater? I am able to use Update Rows to get individual tiles to display as saved or un-saved, but if I leave the page everything re-sets. Can you store the table values in a Global Variable? Can you put arrays in a Global variable? Thanks :slight_smile:


#2

This is just the way Axure works, for all widgets, not just repeaters. There is no built-in database or set of cookies tracking page changes for “live UI” experiences. The only way to do this from one page load to another (or across pages) is with global variables, and global variables can only contain raw alphanumeric data–not objects like a repeater dataset, repeater row, images, etc.

Yes, you can, but only manually, not directly or necessarily easily. If your “table values” are alphanumeric, then it is fairly straightforward to represent them in global variables. Doing this for multiple columns in multiple rows of a repeater will require some careful planning in designing a makeshift “global variable as repeater database” plan. If your values are images or shapes, they can’t be directly stored in a global variable, so further work and planning necessary–but still possible to track it across pages (or page loads.)

Same kind of answer: yes, but not easily. Axure does not support true arrays, unfortunately. So, you’re left with creating your own “array-like data structure” in a global variable, and creating a method to write/edit data to this pseudo-array as well as a method to read data from it.

Take a look at this thread where I showed a solution for storing data from a repeater on one page and recreating it on another page. In your case it would be the same page, but would use the same approach of updating rows in your repeater. using one or more global variables, via the Page Loaded event.