Triggering Items at Grid Assets

Hey IF Team!
A thing that I’ve been noticing is when I have a global variable using text input I “can’t go deeper” when trying to bind a trigger into an asset grid.

Trying to make it clear :crazy_face:
My structure is this:
image
When trying to triggering an action to the Toggle button, the deepest level I can reach is the Asset grid level.

It would be nice if we can trigger actions not only to the Asset Grid but also to their Items specifically.

Best!
Ihnder

Hi @Ihnder

What does that “Toggle Button” trigger?

One solution to your problem would be to have a toggle button outside of the data source and bind the checked state of “Toggle Button” to a Toggle button outside of the collection. Then whenever you want to trigger the actions on that button you will simply need to check the second button which will trigger the first button.

I hope this is clear?

Regards,
Louie

1 Like

Hey Louie,

I understood what you meant.


But when inside an Asset Grid the expected behavior is applying to all list (non-member toggle set),
image
and with a (member toggle set) they only blink the “selected color” green.

The toggle button set a folder to other asset grid display some images.

What I’m trying to do is, depending at some tangible object ID, “check the first item”

Hope I was clear :crazy_face:

Best,
Ihnder.

Hey @Ihnder

You could do me a quick video of what you mean?

You could send it via PM?

Regards,
Louie

1 Like

Hi @Ihnder,

Unfortunately when it comes to data feeds, what you are asking is not possible at the moment and might not be for a while. The reason relies in the nature of an action: it needs a target. And only 1 target, not un indefinite number of potential targets and a “way” to select one of those.

Because you have a data feed in your collection (what you say applies to any collection, not only asset grid), when you have a trigger from “outside this collection” (ex: your global variable), you have no way to decide if you want to call the action on toggle button #1 or #4.
If you had, you would probably use conditional triggers, if variable == “garage” then check toggle #1, if variable == “jardin”, then check toggle #2, etc…
Then, what’s the point in having a data feed? Manually create your 4 toggle buttons to handle these 4 conditions.

Another approach is have a trigger raised within the data template “Template for items of Rows”. When the trigger is raised inside a template, you do have access to all its children, because you have the context of which element raised the trigger. Ex: “moved into focus” for items in an asset flow.
There are ways to generate such triggers, as the ones I’ve been discussing recently with @Louie_Smith for one of his projects, but it really depends on your scenario and indeed relies on bindings.

Can you tell us more about what trigger should do what action in your XP?

1 Like

@Seb

I think I have this one cracked :wink: I think what he was asking for is when the object is placed on the screen for the first time it will need to check the garage button. But because this is a member of a toggle set and data source he can not do this directly on the button because its pulling from the rows in the spreadsheet.

So the solution would be to have a separate column within a spreadsheet with the checked/unchecked state and bind the checked state to the column so when he now moves this on screen he will be able to have the content filtered automatically because of the states being mentioned in the spreadsheet.

I do think if this solution does not work you will need to have all the 10 toggle buttons like @Seb mentioned above.

Please see the example below which I believe will help in @Ihnder scenario, Do let me know the result.

Checked Button on Start Community.zip (2.1 MB)

Regards,
Louie

Fellows @Louie_Smith @Seb :raised_hand_with_fingers_splayed:

Seb I think Louie explained very well what was the issue.
And Louie, yes the solution was to create another column with their default states, worked like a charm, so simple that I couldn’t believe it worked.

If you still want to know more about this experience, please get in touch!

Thanks a lot for sharing some of your time on this :blue_heart:

Best, Ihnder

2 Likes

If it’s “just” to have the 1st toggle of the feed selected when you launch the experience, there’s an alternative method © @Alex: in the template, on your toggle button, add a timer trigger at 0.1s with a condition on a unique ID column in your data feed (ex text) and compare it to the value the 1st button should have: “garage”. If this condition is true, check the button, you can do it since the trigger is inside the trigger :wink:

1 Like