Hi All,
With the help of this community i have attempted to build my first literation macro.
Overview:
- I have a workflow which i reference a Query (where i download the data and json parse the results)
- I have been successful at obtaining a single JSON string that I then parse into a table
- The query needs to dynamically change based on a parameter (endcursor) within the query
Problem Statement
Using the examples online, the input of my macro is a "text input" and using the "Iteration Query" . I then use the formula to download the Data and then use a Json Parse.
Further along the chain i can see i am pulling out the "EndCursor" To Create a new Query.
When i run the macro, i am returning data, however its the Data from the "Text Input" and not the data from the Database
Query
query{
getAllCompanies(companyLevel : "Company", pageControl:{first:2}){
totalCount
pageInfo {
endCursor
hasNextPage
startCursor
hasPreviousPage
}
edges {
cursor
node {
companyId
name
}
}
Query Results
{
"data": {
"getAllCompanies": {
"totalCount": 20000,
"pageInfo": {
"endCursor": "Q0RNQzAwNDF4NE90ak54WUM0bDE=",
"hasNextPage": true,
"startCursor": "Q0RNQzAwM2lBdThjYWc4UGR3cjU=",
"hasPreviousPage": false
},
"edges": [
{
"cursor": "Q0RNQzAwM2lBdThjYWc4UGR3cjU=",
"node": {
"companyId": "CDMC003iAu8cag8Pdwr5",
"name": "ABC Testng"
}
},
{
"cursor": "Q0RNQzAwNDF4NE90ak54WUM0bDE=",
"node": {
"companyId": "CDMC0041x4OtjNxYC4l1",
"name": "Test 1"
}
}
]
}
}
}
Iteration Query
query{
getAllCompanies(companyLevel : "Company", pageControl:{first:2,after:"Q0RNQzAwNDF4NE90ak54WUM0bDE="}){
totalCount
pageInfo {
endCursor
hasNextPage
startCursor
hasPreviousPage
}
edges {
cursor
node {
companyId
source
name
}
}
}
}Unfortunately i am unable to upload the workflow, but i have attached a screen shot, and the iteration macro
Looking forward to your assistance
Regards
Masond3