Question

adding new values to a choice user parameter.

  • 20 January 2023
  • 2 replies
  • 85 views

Badge +9

I am using user parameters to direct the input and output of a workspace app.

the user parameter is a choice configuration with allow choice edit enabled.

This does allow the user to type or paste the value required in.

I have the allow edit enabled to the parameter.

It would be nice though if the checkbox allowed actually ADD(appending) the new value to the parameter list and not just to run the workspace with the new value and then lose it.

 

(edit: I am not sure why but previously the app would not allow me to change or edit the value but now i am able to do that so i assume that was user error)


2 replies

Userlevel 3
Badge +17

I don't know if I understand your question correctly, but some explanation.

 

If you create a User Parameter it will be in the list of User Parameters. In this list you can edit it's settings. You can edit the Choice Configuration to add more Choices.

 

And you can create a new User Parameter. A User Parameter that is a Text Box if you want, or a File Picker.

 

If you edit your Reader (or FeatureReader, that is more flexible to set up) then you can pick what User Parameter you want to be it's input. So if you create a new User Parameter that is not a Choice Picker but a Text Box you can use the Text Box for the reader.

 

A Choice Picker will have a set of Choices that you fill in (or Import from a file). And if you set it on Allow Choice Edit, the person running the Workbench can choice to pick one from the list or write one themselves. This will not be appended to the list. If you save all the picks to a file you can Import the Choices ones in a while from this file.

 

(Or you could create a workbench that reads your FME Workbench file as a text file and change the pick list in this text file. Be aware that you could easily break your Workbench file. And that users can add choices like Bobby Tables...https://xkcd.com/327)

 

 

Userlevel 5
Badge +25

The enable choice edit option allows your user to enter a value that's not in the choice list. However, as @jkr_da​ points out, if you allow your users to enter freeform text you really should add some processing to check that input and make sure nothing 'funny' happens.

Reply