is it possible to select an attribute on a data pill starting from an in put parameter in a subflow?

Gaetano Carubia
Tera Contributor

I want to develop a subflow that take as inputs a record in a table and an attribute name and then perform some activities on that attribute of the input record.

e.g. my inputs are a record in the asset table and "support_group" attribute name. then i want to check if support_group of the asset input record is empty and, if the condition is met, perform other actions.

Said in a different way, is it possible to pick the support_group attribute of input record in the data pill starting from an input string?

 

Is it possible to  perform such action in a subflow?

 

Reason for this is that I need to perform the same set of actions on different attributes.

1 ACCEPTED SOLUTION

Ok I think I understand your request, so I tried the following, modified my inputs to be an array, so I can pass X number of fields:

DiogoRamos_0-1728674870629.png


Then I use the concept of a for each, and a flow variable, my for each will run on each item of the input array, and it will set the flow variable to the value of the respective GlideRecord passed as input.

DiogoRamos_1-1728675100581.png

 

At this point, since my flow variable has the value of the GlideRecord for that respective field, I can use it on any logic I want, for example IF conditions. But the ideal scenario would be to either have an action or another subflow that you can call and pass the required info like (GlideRecord Value, and operation to execute).

Either way, using a flow variable allows you to use the values in a data pill format. 

Hope it helps
Cheers

 

View solution in original post

3 REPLIES 3

Diogo Ramos
Giga Sage

Hello, 

I tried the following for your example : 

DiogoRamos_0-1728588501443.png

Using an example of an incident record, and a string field name 
Then using a log action just for testing purposes : 

DiogoRamos_2-1728588653963.png

 

This allows you to dynamically pass the field name to a gliderecord type of input, and extra the final data :

DiogoRamos_3-1728588697745.png


Off course you could just switch the string input to an array of strings and then make use of multiple input field names if needed.

Hope it helps.

Cheers

 






Hi Diogo,

Thanks for suggestion, it partially solves my issue.
To have a complete solution I need to understand how to use the retrieved attribute as an actionable data pill to be used e.g. in if statements or in record update action.

Ok I think I understand your request, so I tried the following, modified my inputs to be an array, so I can pass X number of fields:

DiogoRamos_0-1728674870629.png


Then I use the concept of a for each, and a flow variable, my for each will run on each item of the input array, and it will set the flow variable to the value of the respective GlideRecord passed as input.

DiogoRamos_1-1728675100581.png

 

At this point, since my flow variable has the value of the GlideRecord for that respective field, I can use it on any logic I want, for example IF conditions. But the ideal scenario would be to either have an action or another subflow that you can call and pass the required info like (GlideRecord Value, and operation to execute).

Either way, using a flow variable allows you to use the values in a data pill format. 

Hope it helps
Cheers