Is there any way via Workflow to set the value of a dropdown or input field?

Is there a way via workflow to set focus on a dropdown or input box and then have it set the value of it? So not actually update the field value, just on the page layout? I see there’s “Set focus” under element actions but I didn’t see anything about “set focus and set the dropdown’s value to …” Thanks!

1 Like

have the same question!!

Unless there is something more to this question that I’m just not getting, there is a Default value setting on a dropdown and there is an Initial content setting on an input, and the purpose of those settings is to do exactly what the original poster described (i.e., show a value in a field when the page loads). Is there a reason why those settings won’t work for you?

Best…
Mike

1 Like

You could use a custom state + conditional On the drop down

On page load (or other scenario) -> set state

Conditional on drop down
When state = ______
Initial content = desired value

1 Like

Thanks, @mikeloc and @chris.williamson1996! To give a bit more context, what I’m trying to do is create a “shuffle button”. That way, a user can either select a category themselves from the dropdown and have the below repeating class list reflect classes from that category OR click the shuffle icon to shuffle through categories and their classes.

Right now I have a workflow set up so when the shuffle button is clicked --> display list in repeating group --> datasource = categories = random item. so that’s working. however, the text in the dropdown doesn’t change with it so now the dropdown could say “cooking” but you’re seeing art classes. I’m trying to get the dropdown to change to the same random value when the button is pressed.

Thanks!

Ah, that is certainly more context than the four words in your previous post. :wink:

In this case, I would go with what Chris proposed and set a custom state on the dropdown when the shuffle button is clicked, and use the custom state to set the default value of the dropdown.

Best…
Mike

1 Like

Same concept as I made above but make each a custom state called “category” type = number

Each category will have a value called category ID
For example 1,2,3,4,5,6,7

On button click -> Generate random string (min 1 max (number of categories). -> set state of category with the result of random string.

Drop down conditional for if custom state category is not empty-> Initial content is -> do search for category (constraint of search; ID = Custom State value)

Repeating group will have a conditional for
If drop down is not empty

Do search for (RG type)
Constraints for category = category Id

2 Likes