Show default value in a picker instead of being blank


Maybe it is something that I am not doing properly but I would like my picker to show a default text like you can do with other field types. Something like “Choose level…” and then the rest of the values are the levels to be selected.

Any way to achieve this?

[good question :fire:]
I didn’t try yet, but I would try using the new Run Script interaction for picker and writing a script to set the default value like “Select a category” or whatever.

1 Like

Thank you so much for your answer Marcos. I am so busy these days that I didn’t even have time to test what you suggested me. I am going to try and let you know if I am able to do it. Remember that I am not good -at all- writing scripts even though they are not complicated. I am guessing that I won’t know how to write that script but I will try myself.

1 Like

Ok. I am back into this. I am guessing that the place where I should write the script to show a default text in the picker would be where the “Edit script” of the picker:

I would really appreciate some help making the script as I don’t know how to do it.

Thank you!

There isn’t a way to show that like light form text in the field like you can for the input text. That is a good suggestion though from my POV. You can set a default value but it also has to be in your selection list.

  1. Create your selection list data sheet
  2. Create dataslot called like “ds_selectedValue” (and set a default value that is in the data sheet list)
  3. Hook up the picker to take items from the list
  4. Pick the “ds_selectedValue” for both the selected value and for the saved data slot value
  5. Launch app and you should see the default value is selected in the list

1 Like

Thank you so much for your elaborate answer. That made the trick perfectly and it just fits what I wanted. It may be a good thing to add the possibility to do it just as a text field does but it is not difficult to do it this way.