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-16-2023 04:55 PM
Hi @JPing , did you find a way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2024 08:06 AM
So in the parse script instead of using "fd_data" use "inputs.fd_data"
Example:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 09:56 AM
I see that now in Vancouver the autocompletion is working properly and it will provide the available variables. I don't think this was available back when this thread started right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2024 07:32 PM
What version of SN are you on for this to work?