Service Catalog Form - Creating an incident based on variables from business user

Dimitrios Hatzi
Tera Contributor

Hello everyone.

 

I have created a catalog item (user input form) that allows the business community to submit a request and in turn a new incident is created.

 

I am having difficulty with the mapping of one of the fields. The question is a drop down.

 

DimitriosHatzi_0-1727373969682.png


In my flow, I am setting up the 'Short Description' to show whatever value is picked from above.

 

The flow runs, the incident gets created but the 'Short Description' displays the value and not the text. In fact, I am referencing the same variable for the category which appears wrong.

DimitriosHatzi_1-1727374232576.png

 

My question is, why is it mapping the value versus text and how can this be corrected on my flow?

 

DimitriosHatzi_2-1727374354840.png

 

DimitriosHatzi_3-1727374449883.png

 

Thank you kindly for any support and my apologies for the simplicity of the question.

 

Dimitri

 

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

Is there a reason you are doing this with a request form that creates an incident via a flow instead of the out of box solution for this sort of thing which is a Record Producer?  If you don't need and aren't doing anything with the 'request', then this is the recommended method.  A Record Producer can appear in the Service Catalog like Catalog Items, the difference is it creates a record on the target table - an incident in this case - instead of a REQ, and RITM.  You create variables just like you do in a Catalog Item, but have the option to map them to a field on the target table.  For data you want to collect that doesn't directly map to a field, like Short description in your scenario, you can use the Record Producer script to set the value.  In this case you would use something like this:

current.short_description = producer.category.getDisplayValue() + ' - ' + producer.variable_name2 + ' - ' + producer.variable_name3;

Use .getDisplayValue() for variables/fields that have a different stored value than what is shown - like reference, select box,... 

If you already knew all of this and/or are set on the request with flow, I'm sure there's a similar way to get the display value in Flow Designer - I just don't know what it is.

 

View solution in original post

2 REPLIES 2

mihirlimje867
Tera Guru

Hello @Dimitrios Hatzi ,
If you want to map a field so don't map with the flow. 
Kindly try to used the Record producer script
For ex:

current.short_description = producer.name;
current.description = producer.description_sc;
current.category = producer.Request_type;
current.subcategory = producer.request_detail;
current.u_acct_num = producer.account_number_;

// current = this object refers to your incident table.
// producer = this object refers to your catalog item.

 

Please hit on the helpful button.
Thank you.

Brad Bowman
Kilo Patron
Kilo Patron

Is there a reason you are doing this with a request form that creates an incident via a flow instead of the out of box solution for this sort of thing which is a Record Producer?  If you don't need and aren't doing anything with the 'request', then this is the recommended method.  A Record Producer can appear in the Service Catalog like Catalog Items, the difference is it creates a record on the target table - an incident in this case - instead of a REQ, and RITM.  You create variables just like you do in a Catalog Item, but have the option to map them to a field on the target table.  For data you want to collect that doesn't directly map to a field, like Short description in your scenario, you can use the Record Producer script to set the value.  In this case you would use something like this:

current.short_description = producer.category.getDisplayValue() + ' - ' + producer.variable_name2 + ' - ' + producer.variable_name3;

Use .getDisplayValue() for variables/fields that have a different stored value than what is shown - like reference, select box,... 

If you already knew all of this and/or are set on the request with flow, I'm sure there's a similar way to get the display value in Flow Designer - I just don't know what it is.