Help Needed: Editing/Updating Multiple Records with Xano Post API
Objective: I want to be able to edit/update multiple records through the Xano Post API for my tables
Summary of issue: I understand that the issue is in the mapping a list [] to a singular field. My 'Edit Record' function is not allowing these arguments/inputs to be passed and throwing an error. But I don't know how to fix this
Steps/Process I am following
Example table 'Fruits'
Schema: id | created_at | name | price
Step 0: Created LIST Inputs as
•  item_id_list_input; integer []
•  item_name_list_input; text []
•  item_price_list_input; integer []
Step 1: Created a For Loop where the input item_id_list_input is passed;
• function is For Loop
• input of this step is item_id_list_inputÂ
• output of this step is a variable called item_id_list
[Screen Shot 2022-06-06 at 15.29.35 PM.png]
Step 1a: Under the For Loop, created a step to 'Get Records' from fruits WHERE field_name fruit_id is equal to item_id_list;
• function is Get Record
• input of this step is item_id_list
• output of this step is item_original
[Screen Shot 2022-06-06 at 15.29.46 PM.png]
Step 1b: Under the For Loop, created a step to 'Edit Records' from fruits WHERE field_name fruit_id is equal to item_original.id
• function is Edit Record
• input of this step is item_original
• output of this step is item_updated
• mapped fruit_name to item_name_list_input; text []
• mapped fruit_price to item_price_list_input; integer []
[Screen Shot 2022-06-06 at 15.30.07 PM.png]
Error that I am getting:
• name - Text filter requires a scalar value
• price - Integer filter requires a scalar value
[Screen Shot 2022-06-06 at 15.33.09 PM.png]
Other
16 replies