The CreatorCon Call for Content is officially open! Get started here.

fd_data in flow designer

andymcdonald
Kilo Guru

I'm trying to use the fd_data object to set a value in my pagination script, unsuccessfully -- the value never gets set.

 

In my parser, I have this code

inputs.fd_data._4__pagination_setup_step.asset_id = item.assetid;

However in my pagination script, when I log the value of asset_id, it never gets a value, even though item.assetid is updated many times while processing the page of data.

 

Is fd_data ready only?  Is there anything I can do to make this work?

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@andymcdonald 

using fd_data you can access the value, but you cannot set it

Share your complete requirements and script along with screenshots.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

andymcdonald
Kilo Guru

Thanks Ankur.  My requirement is to use a value from the data item to paginate the data. 

 

The hope is to get the max value from each data page which would be in the last element of the results array, that is, the last “item” as seen in the parsing step.  However, it seems the data items are not available to me in the pagination script, unfortunately.  If you know of a way to access the data items in the pagination script, that would be great!

 

Data looks like this:

{
  count: ...
  next: ...
  previous: ...
  results: [
    {
      <my-element-here>: ...
      ...
   },
...
  ]
}

I have no problem accessing count, next, previous in the pagination script, but I am unable to access anything in "results".

 

Thanks for you help!