I have a user-specific text data-field which I populate with a choice component. The choice is set to allow multiple. This creates a list of values such as “1234,5678,91011”.
I am also looking to populate this user-specific text data-field via a button on detail pages. This works with a single value by using the “Set Value” action. But how can I change this to an “Add Value” action so multiple values can be selected via clicking the button on multiple detail pages? Currently clicking the button on another page replaces the existing value.
I see, I dont think this would work for adding multiple values.
I understand it would work for adding a single value to an existing set of values.
I’m looking for a sort of add to cart function. So I can go to various detail pages and click a button to add the reference number to a column as a list.
I read that as saying that each time you click the button, it would add the associated item to the list.
But are you saying that you would want to select multiple items across several pages first, and then have a button that would add them all at once?
Either way, personally I would probably approach this a different way. I would use a single row Helper Table for my Cart, and add/remove items into an array column (Multiple Files column) via a Single Value->Whole Row column.
It’s kind of difficult, because I have no idea what your table structure looks like, but the general idea would be as follows:
Single Row “Cart” table, containing a User Specific Multiple Files column
In your Products table (or whatever it’s called), you’d need the following columns:
– Single Value->First->Whole row column that targets the Cart table. This allows you to Set Column values in the Cart table from the Product table.
– Single Value->First that fetches the Multiple Files column from the Cart table (this gives you the current contents of the Cart)
– Make Array column: combines the previous column with the current rows ItemID (use this to add items to the cart)
– Remove Element column: removes the current rows ItemID from the Cart array (use this to remove items from the Cart)
Adding and Removing items is a simple Set Column Values action, operating on the User Specific column in the Cart table via the first Single Value column: using the value of the Make Array column to add to the Cart, and the value of the Remove Element column to remove from the Cart.
To clear the Cart, it’s simply a matter of clearing the value in the same column.