How do I get a record from a table and extract ele...
# 🤝help
g
I'm making a restaurant ordering bot. I have an inventory table with items and their prices. The bot shows pictures of items with their prices. When a user inputs the name of an item, the bot triggers an intent for that particular item, which then goes into a "Find Record" step. It filters by the name that the user provided, finds a match, and stores all the related columns (price, name, etc) in an array variable. I then use the Execute step to extract one or two elements to use later in the confirmation process. This worked exactly ONE time. Until I tried to extract elements from it. Now nothing is recorded into the array variable, even though there are no errors in the log. I have chopped everything up to pinpoint the issue but can't seem to find anything wrong.
g
Can we see some pictures of your set up (mostly find record card I'd say)
h
So now you can't extract the array anymore?
If you have access to the array then you can extract the elements you want in workflow variables and then use the variables in the file and text
g
To start with, do you get anything inside your array variable?
g
Nope. The variable should be getting four variables (2x times, product and price). It did the first couple of times. Now its dead.
Four elements*
Posted
That was my plan. The array itself stays empty now.
g
What is your execute code card @gorgeous-zebra-55198 ?
What is workflow.selectedItem ? Because if it is crab, I think that your find record card filter should be more like : Product is @workflow.selectedItems
But I havent used that much find record cards so I'm not the best at finding problem with it
g
I'm out. Will post as soon as I get home.
But really the problem is with find records
I have tried different variants of product is @workflow.selectedItem. the result is the same.
The one you quoted was the first one I used.
I'm inclined to think that this is a bug at this point. Because I got as far as extracting two elements from the table using the execute code block.