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"

}
<<END>>
]
}

Solved Solved
0 4 189
2 ACCEPTED SOLUTIONS

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>>

View solution in original post

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"
    }
    ]
    }

View solution in original post

4 REPLIES 4

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>>

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.

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"
    }
    ]
    }

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

Top Labels in this Space