API Inquiry

I have an api request, i was wondering how the best way would be to edit multiple rows and apply a different value to each row. as it is now i can select a value and apply to all rows. but i want to apply a different value to each row

{
“Action”: “Edit”,
“Properties”: {
“Locale”: “en-US”,
“Location”: “4.623098, -1.330184”,
“Timezone”: “Pacific Standard Time”,
},
“Rows”: [ <<START: SELECT(perz made materoals[Material ID], [Supplier ID]=“c9Hvc9wa”)>>
{
“Material ID”:“<<[Material ID]>>”,
“Materials”: “Test123”

}
<>
]
}

Use an expression–just like you’re already doing for the “Material ID” value. In place of “Test123”, use:

<<*whatever expression you need using any AppSheet functions and table/column references*>>
2 Likes

so i would have to have a separate column in the table with the preset value for each row? Im looking to set each row to a specific name nothing to caclulate.

one other question if i want to apply a different formula to different rows would the best be be to just call another api?

Instead, you can also explicitly list each object in the Rows array. If you don’t already have a list of which “specific name” corresponds to which “Material ID”, then you’d need to somehow calculate the “Material ID” for each row.

{
    "Action": "Edit",
    "Properties": {
    "Locale": "en-US",
    "Location": "4.623098, -1.330184",
    "Timezone": "Pacific Standard Time"
    },
    "Rows": [
    {
    "Material ID":"<<INDEX(SELECT(perz made materoals[Material ID], [Supplier ID]="c9Hvc9wa"), 1)>>",
    "Materials": "specific name #1"
    }, 
    {
    "Material ID":"<<INDEX(SELECT(perz made materoals[Material ID], [Supplier ID]="c9Hvc9wa"), 2)>>",
    "Materials": "specific name #2"
    }, 
    {
    "Material ID":"<<INDEX(SELECT(perz made materoals[Material ID], [Supplier ID]="c9Hvc9wa"), 3)>>",
    "Materials": "specific name #3"
    }
    ]
    }
2 Likes