Recurrent data input problems in tasks

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Recurrent data input problems in tasks

Hello,

Data key received from API calls don't always have the same format in the context. Example:

Sometimes it could be:

data.[0].results.username

data.results.[0].username

data.[0].results.[0].username

data.results.username

The API call is the one creating these formats in the context. There's no possibility to change the call.

How can the input for the task be modified to accept all format possibilities?

 

 

2 REPLIES 2

L2 Linker

Hello,

To be honest it very much depends on how and where you want to use the data. There are quite a few options for dealing with context data dynamically such as "ContextFilter" :

Explanation - Filter context keys by applying one of the various available manipulations and storing in a new context key. Please notice that the resulting context key will not be available automatically as an option but you can still specify it.

 
From experience however I would recommend to write a custom automation script that will dynamically interact and sort the data from the key "data". This way you can see exactly what you mare working with and provide Attestation for each stage of further interaction. In any case please elaborate on what you plan on doing with the data you have received, perhaps others would be able to provide a more direct solution. 
 

Hello Michael, thanks for your help.

So the idea is to create a small script to check which variable is defined and give a new output.

Nice idea! I'll take a look at "ContextFilter", to see how it works.

 

 

 

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!