- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 01:56 PM
Hi All,
- I'm creating an inbound email action using flow to load data from email attachment(.xlsx) and transform data.
- I'm trying to query Transform history table to get "import set run" details using look up Record action. It returns "Record not found".
- Since look up record action is not working. I'm now using flow action---Script step to get the required data.
Sample code:
Snip of flow that gives no value in "Ignore" output.
Snip of test performed in Flow Action which return value as 10:
Kindly help me resolve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 06:53 PM
Is the import set sys_id is always constant? If not, If you are passing it dynamically based on the execution of transform, there might be a chance that the transform is not completed by the time this action is executed. Can you also change your code a bit like the one below and test.
(function execute(inputs, outputs) {
var ImportSysId = inputs.ImportSetSysId;
var gr = new GlideRecord("sys_import_set_run");
gr.addQuery('set.sys_id', ImportSysId);
gr.query();
var ignore = -1;
if(gr.next()){
ignore = gr.getValue('ignored');
}
outputs.ignored = ignore;
})(inputs, outputs);
After updating the code, perform a test run, if you get -1 as the output it means the transform is not completed.
Can you also share snips of your flow, it would be more easy to understand and help you better?
Please mark my answer helpful and accept as a solution if it helped 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 06:53 PM
Is the import set sys_id is always constant? If not, If you are passing it dynamically based on the execution of transform, there might be a chance that the transform is not completed by the time this action is executed. Can you also change your code a bit like the one below and test.
(function execute(inputs, outputs) {
var ImportSysId = inputs.ImportSetSysId;
var gr = new GlideRecord("sys_import_set_run");
gr.addQuery('set.sys_id', ImportSysId);
gr.query();
var ignore = -1;
if(gr.next()){
ignore = gr.getValue('ignored');
}
outputs.ignored = ignore;
})(inputs, outputs);
After updating the code, perform a test run, if you get -1 as the output it means the transform is not completed.
Can you also share snips of your flow, it would be more easy to understand and help you better?
Please mark my answer helpful and accept as a solution if it helped 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2023 02:06 PM
Hi @AnveshKumar M ,
Thank you for your response.
Your assumption was true, Transform was not being executed till the time action is being processed.
I've now added a wait condition before the transform action and it worked perfectly!
Appreciate your help!