Workflow Thing as a List

I’m trying to create a custom event on a Carousel element. The Carousel’s data source is a list of products called Live Orders. The Carousel displays the Live Order’s image. My page also has a multi select drop down. I’m trying to create a custom event that is triggered when the dropdown’s option is ‘Sort Low to High’. In this case I want the Carousel’s data source to be sorted by ascending Price. How can I get the ‘workflow thing’ to be a list of things (a List of Live Orders) instead of just a single Live Order. Below is a screenshot of what I tried to do and the error.

Thanks, RG

Custom event only has a single thing as a parameter, not a list of things. You could pass a single parameter to determine which sort to use, for example the value of the dropdown, and move the check on this value into the custom event workflow’s actions.

What did you have in mind for changing the sorting in the data source of the carousel? For example, Dynamic field... ?

Edit: the conditional tab doesn’t have an option to change the data source.

Thank you for your reply @mishav. What I’m really trying to do is change the data source of a carousel based on the value of multi drop down’s selection. So "When multi-drop down’s value contains ‘X’ ", then change the data source ie. then "do a Search for Type Y’ with constraints or sort by…

The simplest would be for the data source search to have a sort field of “Dynamic field…”, it then expects an expression which evaluates to a field name to sort on. This could use some logic based on the dropdown’s value, like :find and replace, or retrieving a custom state with the name of the field.

One alternative is to have the workflow set a custom state’s value to the search result, and the data source to use that. This is less dynamic, and requires the workflow to run each time a change happens, to replace the data source. Which is fine in most cases.

Another alternative is setup a repeating group with the data source, and use the conditional tab to change the data source depending on the dropdown value. Then the carousel data source can refer to the repeating group’s list.

Which approach you take depends on what other things you think will need to be dynamic.

Good luck!

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