How do I hide an item after a user has interacted with it?
I am presented users with a list of activities they can do. For each activity, they can click the “add” button to add it to their list, or the “pass” button to not add it to their list (and not have to see it again).
I used “currently repeated property value” to bind the elements to my data source. Works great.
For the buttons, I added the logic step “Hide component”.
But nothing happens when I click the button. It does not hide the individual item. It doesn’t even hide the entire component (all items).
I believe the app number is 98690 (“Setup Activities List” view).
The correct way is to edit your source data! Let’s say you have
pageVars.activities array with the items in your list. When they click the “pass” button, you can remove the clicked item by using Set page variable flow to set the
activities page variable to formula
Thanks for that info. I’ll have to do a bit of work to see if I can adjust it for the particularities of our scenario.
I’ll post back on this thread if I end up needing further help. Otherwise, much appreciated!
@Harri_Sarsa I’ve hit a block with this. Hoping you can help!
Originally, we populated our activities from a data variable.
In order to manipulate this list as you described, I now populate that data source into an app variable as soon as the data loads.
However, it’s not applying any of the data to the app variable properties
Even though the data was successfully fetched
@Harri_Sarsa We ended up working around this by using the data variable directly. I’d still really like to know, though: Is it not possible to set app variable arrays from a “Get record collection” or other data variable?
In your screenshot, you are binding the output of Get record collection to individual fields of a statically constructed array of objects’ first object. In theory, it should set your app variable to a value like
name: [ entire collection of records from the backend ],
imageUrl: [ entire collection of records from the backend ],
activityId: [ entire collection of records from the backend ],
activityUrl: [ entire collection of records from the backend ],
shortDescription: [ entire collection of records from the backend ],
Not sure why it’s not doing that.
In any case, you should change the binding type of the whole Assigned value property to Output value of another node, similar to how it is in the Set data variable node.
Thank you! I’m glad there is a solution for that.
I think I’m running into the same issue here but can’t seem to figure out what piece I’m missing to resolve.
From a REST call I retrieve a dataset into a data variable. Basically I’d like to add another property per record in the data variable called hideshow. As the user edits data in a form I’d like to show a Save button using this property per line in the form.
Any suggestions on the best method to do this?
Cancel that, I just found the set component property function in the market place