Collect record from table by using a variable
# 🤝help
b
What I want to do: I have a table of records and I have a variable that captures information as a number from the user. I want to use that variable to find a record in the table. What I expect should happen: The variable is used to find a row that has the variable value in a unique identifier column other then the Record ID. This row is assigned to another array variable. In the node, two flow logic sequencers are there, one which goes another node if the row is present with the variable value in the unique identifier column. Another sequencer goes to a different node if the row isn't found. What's happening instead: I have search the documentations, videos and I haven't found a single article that says how to do this. Every single thing related to table mentions how to manipulate records of a table using constant values like // Find records in the table const data = await Data1Table.findRecords({ selectorName: 'adults' }) workflow.adults = data OR // Get a record from the table and store it in a variable const data = await Data1Table.getRecord(1) // 1 is the record ID and User is the variable name workflow.User = data Whereas I want to... // Get a record from the table and store it in a variable const data = await Data1Table.getRecord(workflow.waybill_no) // 1 is the record ID and User is the variable name workflow.User = data Please help, thank you!
b
I second this! The absolute first thing I tried to do with tables was I thought the most obvious: have a user give a name/email or other unique identifier, I would "get" the record based on the email variable... and if it came up empty... make a new record. But nothing I've tried or documents says how to do this. the code generator doesn't seem to know what tables are yet, as it usually gives me some "example URL" in the code.
15 Views