Accessing Data pill variables from Script parser Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2023 02:01 PM
Hello,
I have created a Data Stream Action. I set a variable in Pagination Setup Step, I then use this in construction of the Rest Step. It works perfectly. I am able to drag the pill into the Resource path.
I would like to use this same variable in the Script Parser Step, how do I access this variable?
Here is the Script parser Script
(function parse(inputs, outputs) {
var item = JSON.parse(inputs.sourceItem);
outputs.targetObject.name = item[0];
outputs.targetObject.email = item[1];
outputs.targetObject.query = <varaible set in the pagination step>;
}
My Pagination step does not paginate on pages but rather on an array of queries. For each query a set of data is returned. As I parse through each row and I want to add the query that was used to the import set table. To solve this all I need to do is access the variable I set in the pagination step.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 07:04 AM
Hi Scott, I believe that screenshot was from Vancouver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 09:36 PM
Wondering if you found a solution to this.
I have a similar requirement. Exactly like your scenario, except I have a need to access an input variable in the script parser step. My REST call returns rows of data from a report, but lacks the column headers, so I also need the column headers array from my input variable to build the output object. I tried using fd_data but I get an error that fd_data is undefined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 09:57 AM
Hi @Jacob26, yes JPing highlighted that variables are made available under inputs.fd_data...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 05:45 AM
Hi @Gabriel Moreir2, even though these variables appear accessible in the script editor, upon testing the action, these variables are undefined at runtime. The only thing that appears to be accessible at runtime is inputs.fd_data.action_inputs. Not sure why they'd make these appear available if they're really not, but it seems that's the current behavior unfortunately.
I was actually able to solve my use case using a dynamic object in the output. Since the action to determine the schema runs first, I was able to pull the list of columns from the schema object in my pre-execution script step. This probably won't work for everyone's use case, but it solved mine.
Thanks for the comments and feedback thought! Still wishing there was a way to access the full request body from the script parser step, I think it would make everyone's lives a little easier.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 09:46 PM
Hi @JPing
Please follow this Doc you will find some interesting info regarding..
Please mark reply as Helpful/Correct, if applicable. Thanks!