Hello, is it possible to create a loop action in glide?
It’s not available as an action as of now. May we know what’s your use case here?
My use case would be to animate images, for example, rotate an image through 360degrees by having a custom AI component that displays the image. It would have 2 input variables, the image column and the rotation value. Taping on the image would trigger the looping action, e.g. increment the rotation value by 1 degree until the value is 360. Perhaps the speed of increment would need to be handled too… this version allow for manual rotation by sliding the slider!
Couldn’t you instruct the custom component to rotate the image 360 degrees within a certain timeframe, like 2 or 3 seconds? I don’t think it would be necessary to rapidly update a table value when the AI component can do it itself. The component itself would probably only need the image column as a bound column to the component.
A webhook calling a workflow could work, but seems overkill and a lot of I/O against the table. Whereas the AI component can be a little more self contained and do the same thing more efficiently.
I read this in the Glide help pages:
A Workflow can contain one action, a sequence of custom actions, action loops with conditions, and more. To get started, open the Workflow Editor at the top of the screen in the Glide builder.
… but I couldn’t find more info on action loops. Would this be a way to trigger the action and then loop an increment action until the rotation value hits 360? If so, where do I find action loop info?
I believe the action loops are only available if you use a Schedule or Webhook workflow. I haven’t used it, so I don’t have any personal experience with it. I’m not sure if the loops are restricted to looping through multiple rows, or if you can establish other types of loops. There probably could be a very roundabout way to accomplish what you are trying to do with workflows, but I don’t think it would be a smooth process.
What’s your use case for having an image spin in a circle?
You can. For example you can loop through the results of a filtered query, or a JSON collection.
Interesting. Not at my Pc right now but what I understand from your comment is that I can set up a query that looks up rotation values (0-360) and with a filter on a max value that loops from 0-360?
I have used query functions a lot including filters but I don’t remember seeing action loops as an option.
Loops are only available in the new workflows - scheduled, webhook & email triggered.
Simon, animations like this are super doable. Happy to send a template later on.