Hi,
I’m trying to automatically delete a row if a condition is met. I’m attempting to achieve this by using a scheduled workflow that loops through rows in a Glide table.
I have set up my workflow to loop through a database ‘Session Requests’ and filter where an If-Then-Else column ‘Deletion Request?’ is checked. (The “Deletion Request?” returns true when a Query column is empty).
However, when the workflow runs, it deletes all rows in the database. As pictured, despite only one row returning a true Deletion Request, the replay shows that Glide processed both rows as meeting the filtering conditions.
Maybe I’m missing something, and I’d appreciate your help!
Thanks
Session Request Database (before running workflow):
Workflow configuration:
‘Session Requests’ after running workflow:
Workflow replay:
Can you share the configuration of the “Deletion Scheduled?” column please?
Any chance your query relies on a datetime column?
Hello there
I have this exact same issue. I am trying to set up a scheduled workflow which deletes redundant rows from a table so it doesn’t get too big. A redundant row is when a relation is empty (so all rows in the parent table that relate to that row are deleted).
My loop (which is sent to return only rows with the related column empty) - returns all rows.
See screenshots.
Any suggestions? I tried doing a count of relations, but that didn’t work.
Andrew
How is the relation created?
I had the same issue where my boolean that determined the loop was made based on an AI text to date column. Support said that the AI column wasn’t supported in scheduled workflows. I rebuilt the text to date manually and it worked as expected. I’m guessing that once you dig into your “QueryFacilitator” query, you might find what’s going on.
2 Likes
Thanks both
It’s a straightforward relation.
The “master” table splits a single JSON query into 50 rows using an index and query json columns based on the index (using Bob’s tip of getting all row IDs then find index)
As I need to record some extra information against each row, I have a relation to another table on a unique field that doesn’t change. I can’t add columns as the index value may change so the rows would change.
As the JSON is a list of sequential transactions, and I can only store 50 (which doesn’t matter. That’s plenty) - some drop off the bottom.
I want this workflow to delete the rows with no relation as they are not needed anymore.
That’s the crux of it at least!
Is there any where in your flow you reference something related to the users table?
1 Like
Might be worth reporting it in the beta Slack channel (if you’re there).
1 Like