How to set default value for Select field in variable

MWroblewski
Tera Expert

Hope someone can help.

I'm trying to use hidden field as a catch for a flow in record producer.

How can I set default value of Select Box in this variable?

I've tried simple code like current.category= and similar, but I'm always getting static value 'on top of' select options.

How can I get default set as one of the options available in this Category list?

Can this be variable size list i.e list of options could be from 5 to 15 (hope not :))?

 

2 ACCEPTED SOLUTIONS

Jon23
Mega Sage

Hi @MWroblewski,

 

Try updating the 'Type Specifications' and 'Default Value' to:
Jon23_2-1736301395764.png 

>>> Note: default value should match the value of the choice option not the label <<<Jon23_3-1736301460754.png

 

View solution in original post

MWroblewski
Tera Expert

Hi @Jon23,

Brilliant, exactly what I was looking for. Thank you very much.

Any chance you could help me with how to get defaults on this marked fields?

Simple assigning them as Lookup Select Box won't work. i.e. Service field seems to be extension called business_service. How would I set one of the selections as default please?

View solution in original post

5 REPLIES 5

Jon23
Mega Sage

Hi @MWroblewski,

 

Try updating the 'Type Specifications' and 'Default Value' to:
Jon23_2-1736301395764.png 

>>> Note: default value should match the value of the choice option not the label <<<Jon23_3-1736301460754.png

 

MWroblewski
Tera Expert

Hi @Jon23,

Brilliant, exactly what I was looking for. Thank you very much.

Any chance you could help me with how to get defaults on this marked fields?

Simple assigning them as Lookup Select Box won't work. i.e. Service field seems to be extension called business_service. How would I set one of the selections as default please?

@MWroblewski 

For those you will create a reference variable and point to the relevant table the incident form is using. Default value will be the sys_id of the item on that table you want to use.

 

OOB Incident is:

  • Service table: cmdb_ci_service
  • Service Offering table: service_offering
  • Configuration Item table: cmdb_ci

Example variable:

Jon23_0-1736463032551.png

Jon23_2-1736463214248.png

 

 

MWroblewski
Tera Expert

Great, thank you for all your help.