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 …
My structure is this:
When trying to triggering an action to the Toggle button, the deepest level I can reach is the Asset grid level.
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.
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 @Promultis 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?
I think I have this one cracked 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.
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