Hello everyone - I searched the forum for quite sometime now, having trouble with the querying records inside workflows.
I have a custom Compose Record which has a player_id field, and I want to query and check if there is a record with the player_id inside the system, if there is update the record with the new values, if not then create a new record. I think it’s mostly a syntax issue, I have attached a screenshot with what I currently have, but it doesn’t produce the correct outcome.
Can you please elaborate a bit on what exactly is off?
Do you not get any records, incorrect records?
If there are any errors, could you share them as well?
Can you check that the contents in the player_id variable are correct (you can use the debug or a prompt step)? Can you make sure that the type of player_id variable is a String?
The expression seems fine and my quick test resulted as expected.
What you could do is ad an intermediate expression step that would store the query string in a new variable. The variable could then be debugged with a debug or a prompt step as well as passed to the function step in question.
I debuged the expression and it is indeed correct, however there are 0 returned Records.
I created a more simple workflow, with a demo module. ( I’ll be attaching screenshots ), and even in this simple scenario with the iterator, I am getting 0 Records back, although I have added a few.
Note the roles that are assigned to the user executing the workflow (you can see this in the admin web application under the users navigation item).
Then in the namespace’s admin panel go under modules and locate the module you’re fetching the records from.
Click on the lock icon and make sure that the roles in question are allowed to list and search records.
If the role is not allowed to search over records they will be filtered out by the server.
If you also wish to use the lookup functions (find by ID), open up the module in question, locate the permissions button, records; and make sure that the roles in question are allowed to read records of module.