how to edit an existing record targeting it by two or more parameters (fields) evaluating to true?

Options
bcasmvrg
bcasmvrg Member
edited March 2023 in ? Help! I'm a Noob

I want to update a field for a record based on if two column values are true for that record.

E.g - Update/Edit "Complete_Status" to a "1"

IF "Customer_ID" == "12345" AND && "Subscriber_Status" == "Subscribed"

How would I got about doing this? I see that the Edit a record endpoint has the limit stating "If you choose a field_value that maps to multiple records, then the first one found will be used."

I have already figured out how to do this on the GET side of things by using Query All but how do I do it on the POST/edit side?

Thank you.

Best Answer

Answers

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Hey @bcasmvrg — same idea here. Use the Query All Records to retrieve the records based on multiple parameters. If you are editing a list you need to use a For Each Loop to Edit each item of the list.

    1. Query All Records
    2. For Each Loop
      1. Edit Record

  • bcasmvrg
    bcasmvrg Member
    Options

    Thanks for the response @Michael Udinski. I am having a bit of trouble building this out.

    I would be running the For each loop on variable that gets produced from the Query All Records part of the function stack correct? After I run that for each loop - how do I go about updating the records I want from the input?

    Thank you.

  • bcasmvrg
    bcasmvrg Member
    Options

    This is resolved. Thank for the the resources, the 2nd video was especialyl helpful (common roadblocks). It was how I was referencing the variables in the loop that was tripping me up. 👍️

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    great :)