Unable to pass parameter, says undefined

"i" is used as a dynamic property in ForceRemoveDevice API resource.
"i" is derived from a promise when selecting multiple rows from "table2".
Why would it not declare a value in the ForceRemoveDevice API resource.

Screenshot 2023-05-22 at 12.32.44 pm

All I see is undefined.

Without seeing the rest of the code/table2 data; have you tried simply changing
return query.trigger to return ForceRemoveDevices.trigger - perhaps qPreformatted textuery is a reserved word?

@ScottR same happens when I try this on the "support ticketing system" demo data.
I want to select multiple rows, use a field-value out-of-the-selected-row in for example status which is then passed to postman for each selected row. Mutli-select works and I can see the row-index appear as [11, 0, 9] which is correct , however the table1.data.[0] is NULL or undefined after running query2. which means when I run postman there is no value for completing the argument.

const array = table1.selectedDataIndexes

const promises = array.map((item) => {
    return postman.trigger({
      additionalScope: {
        row_id: item
      }
   });
});

return Promise.all(promises)

item which should then contain the array for table1.data.status[11] is then used repeatedly until query2 promise is complete. In this case three iterations. This works just not seeing

Other than using table1.selectedIndex I also see the same results for table1.selectedDataIndexes array.

I have now removed the multi-selection complexity and seeing if its possible to pass-in a simple array. Still seeing the same results. query2 is a JS Code query looking like this :

const array = ['60284:207117:P','60181:207408:P','60188:207417:P']
const promises = array.map((item) => {
    return postman.trigger({
      additionalScope: {
        row_id: item
      }
   });
});

return Promise.all(promises)

When I look at postman with item as a variable, it looks like this. I am expecting to see ['60284:207117:P','60181:207408:P','60188:207417:P'] not undefined . Is there a global setting i have missed ?

I think you're on the right track but notice what I have done

query62

const promises = table6.selectedRow.data.map((h) => {
  console.log(h.id);
  return query63.trigger({
    
    additionalScope: {
      row_id: h.id
      
    },
  });
});

return Promise.all(promises);  

query63
console.log(row_id)

Note that I only passed row_id

Screenshot 2023-05-23 at 8.13.04 AM

1 Like

Yes, that works. Many thanks.