Query RITM and pass variable to SCTASK

Luiz Lucena
Mega Sage

Hello friends, 

 

I'm stuck at something that seemed simple at first glance but it turns out is not.

Few months ago, we deployed a simple and quick catalog item to allow users to submit a request to our security team to allow communication between our company's MS Teams and external companies' Teams. 
Among the variables, we added: 
External Domain (external_domain), if temporary is true, then we presented an end date for that to be revoked.

 

Now, the SecOps team would like to generate a task once that end date reaches. But the Flow that originated those tasks are already closed. 

Then, I decided to add a simple Flow that will be triggered daily, it will query the Requested Items table, like the example below:
Screenshot 2025-07-03 at 19.36.11.png

If records were found, then I need to create a SCTASK to the group revoke access.
Screenshot 2025-07-03 at 19.36.39.png

But is crucial for them to know which External Domain the task is referring to. But I'm not sure how to script that part to pass the variable value for External Domain from the queried RITM to the SCTASK that is being generated.

 

Screenshot 2025-07-03 at 19.51.46.png

 

I'm still crawling in Flow and scripts.

1 ACCEPTED SOLUTION

Ehab Pilloor
Mega Sage

Hi @Luiz Lucena,

You would need to add for each record found in Lookup Record, create Catalog task.

You can toggle script in Description to fetch value with logic something like this:

desc = fd_data.1_lookup_record.request_item.variables.external_domain.getDisplayValue();
return desc; 
// replace 1_lookup_record with action name having RITM datapill and replace external_domain with the correct variable name.

You will get the all actions options in dotwalk after typing fd_data. 

You can add more information to description. Above is an example.

 

Regards,

Ehab Pilloor 

View solution in original post

2 REPLIES 2

Ehab Pilloor
Mega Sage

Hi @Luiz Lucena,

You would need to add for each record found in Lookup Record, create Catalog task.

You can toggle script in Description to fetch value with logic something like this:

desc = fd_data.1_lookup_record.request_item.variables.external_domain.getDisplayValue();
return desc; 
// replace 1_lookup_record with action name having RITM datapill and replace external_domain with the correct variable name.

You will get the all actions options in dotwalk after typing fd_data. 

You can add more information to description. Above is an example.

 

Regards,

Ehab Pilloor 

Hello @Ehab Pilloor 

Not sure what to put right after 'fd_data'.

 

If I follow the dot walk choosing the options shown I'm getting no data, like this:

fd_data._1__look_up_records.records.variables.external_domain_to_be_exempted.getDisplayValue();


If I add fd_data._1__look_up_records.records; I get at least the sys_id of the record.
Screenshot 2025-07-04 at 14.00.56.png

 

But then, I realized what you mean and it worked!

desc = fd_data._2__for_each.item.variables.external_domain_to_be_exempted.getDisplayValue();
return desc;