Selection of multiple picture

Hi experts :-),
it seems like I’m having an easy problem, but I didn’t came up with a solution so far.
I’m having a repeating group with several pictures included. I would like to select up to three of them before starting a chatpgt query. how do I do the selection process?
I’ve tried with a custom state set as a list and add the selected item to that state. Then include “only when” and add the conditions. But that doesn’t work. I guess I’m overlooking something.

Glad for your held.
Cheers
Katrin

This is the correct approach to select some list of items from a repeating group. Then, doing something with this list. Maybe share how you did this, so we can find the problem.

Hi Hergin,
thanks for you quick reply.
He is what I’ve done.
The state is “seleted_ingredient”

And this is what I’ve done in the workflow.

I already have another state that allows you to select an image and clicking on it changes the backshadow. This works, but the multiple selection does not.

Do you have an idea?

This looks like it should work. Adding a text to a custom state text list. And you can refer it later on and do whatever you want.

How do you know it doesn’t work? Is there another condition on the workflow maybe before this action?

If I were you I would display the custom state in a textbox or something to make sure, the items are selected displayed over there.

Ahhh… Now I know where my mistake is. That was the crucial question, how do I know that the state doesn’t work. I assumed that the selection function would also be displayed with the state.
In order to change the boxshadow of one picture, I’ve done that via the conditions directly at the image. So that the respective image gets a red boxshadow when it is clicked.
Do you have an idea how to implement that? It doesn’t work via the conditions.

Thanks so much for your time and effort.

image

You don’t need the count condition. Technically, just the first one should work. If the condition seems to be not doing the job, maybe change another property make sure it works. Maybe you need to make border thicker etc?

Thanks so much. :slight_smile:
Do you also have a idea how to deselect the image again?
For just one image I’ve used that yes/ no state. And included the yes and no alternative.

But how to adapt it to the case just discussed when I can select up to three images and want to deselect one, two or all of them?

Thanks again so much. Totally appreciate your help.

You don’t need to have another custom state for it. There will be two workflows when an image is clicked, the when conditions will be 1) when the custom state contains current cell’s text, remove it in the action, 2) when the custom state doesn’t contain current cell’s text, add it. That’s it.

It still doesn’t work. :frowning_with_open_mouth: I still can’t select three items in a row and deselect them.
Those are the workflows


And this it the condition connected with the image
image

Do you see any problem?
Again thanks so much for your help.

It will not be current cell’s image. It should be current cell’s ingredient’s name. Your custom state is a list of text, remember.

1 Like

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