Get string value from cmdb table reference field

Ron28
Kilo Sage

I wonder if anyone can assist a newby. 

I have created a Catalog Item with a read-only choice question that displays the 'location' column from the cmdb_ci_kubernetes_component table. The location selected depends on the answer of another question so this is just to display the value.

In the Catalog Item this displays perfectly. However when I started to use the variable that holds this location in Flow Designer I found that the 'location' field is a reference field, not a string. I don't see any way of getting the 'display value' for the reference using the standard data transformation options on a selected data-pill in Flow Designer. 

I'm after the string/display value for this reference, the one that displayed so nicely in my catalog item choice field.

I gather there could be 2 options, one is when the location variable is selected to convert it to a display value so that the variable that holds the location value is a string. I'd expect Flow Designer to get a string in this case and all would be well.

The other way is to convert the reference held in the variable to it's display value on the Flow Designer side.

Would anyone have an idea how to do this?

 

Thanks

Ron

 

1 ACCEPTED SOLUTION

Hi Ron,

If there is no option to spot the location name, then you can go with

1. Look up record on cmn_location with the sysid

2. get the name of the location.

Thanks

View solution in original post

8 REPLIES 8

DanielCordick
Mega Patron
Mega Patron

Hey Ron,

 

Can you post a screenshot of your flow?

Muralidharan BS
Mega Sage
Mega Sage

Hi Ron,

Where you use location in the flow designer, dot walk to [location.name]. This will give you the name of the location instead of sysid. 

Thanks

The problem is that the location reference is in a variable set in the catalog item. 

 

Ron28
Kilo Sage

Here is the screenshot, but there's not much to see. The description field here is taking the value of one of the catalog variables, in this case the variable contains the value of the cmdb_ci_kubernetes_component location field, which is a reference. I need the string value of this.

find_real_file.png

 

This is where the variable u_target_datac.... is set in the catalog item. It displays as if it was a string field but as I found out testing in Flow Designer it is a reference instead. Somehow I need the string value.

find_real_file.png

 

Thanks

Ron