Chips selection, via the wrap horizontally RG layout

Hi,

I need a lot of help with chip selection. I have a profile page, where the user needs to select multiple items from a set of chips, as per the screenshot. I’ll use the ‘wrap horizontally’ layout RG option. The source of the chip names comes from an option set. The chosen chips need to be stored in the User data type, as a field with a list of text.

  1. I’m able to show the values of the option set by themselves, but not when inside a group. I’m not sure how to get the text box to reference an option set value when inside a group.
  2. How do I let then user toggle the state of a chip? I assume the chips need to be constructed as groups? There are hover states as well. I assume local states are involved.
  3. How do I make the toggle update the User’s data field?

Thanks for the help!

It’s simple…

First of all, get rid of the list of texts field on the User datatype (that will only complicate things…). You’re using an option set for your chips, so set that option set as the field type for the chips list on the User.

Then, just set up your RG with a content type of Chips, and data source of Get All Chips.

Format it however you like, and add a group inside the cell, with a data source of Current Cell’s chip, and add a text and an icon (the icon shouldn’t be visible on page load).

Then just use conditionals on the icon, text, and group, based on whether the Current User’s Chips contains this Group’s Chip (or current cell’s chip).

Finally just create 2 workflows, to modify the Current User’s Chips when the chip group is clicked (one to add the chip when the current user’s chips doesn’t contain the parent group’s chip, and one to remove it when it does)

Here’s a simple example:

User Chips

3 Likes

Adam, that’s great help, especially with the example! Thank you! I’ll study this later.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.