Automation/Action Not Completing - Need Help Troubleshooting

Working on completing my "Huddle Ideas" app for the clinic, where we can document ideas brought up in our daily meetings, and track testing and progress to see if the idea becomes something we might want to implement.

Everything is working quite well except for the most important part, which is marking an idea testing phase as complete.

I have two main tables, ideas_db to store the top level ideas, and idea_notes_db to store the notes associated with the idea.

So when you're looking at an idea that has been logged, it looks a little like this for now

mykrobinson_0-1673976094682.png

you can click the "add notes" button to... well, to add notes ๐Ÿ˜‚ and when adding notes, you can mark if you are done with testing, and document it as a success or failure. Clicking "Complete Task" instead of "add notes" pulls the same form, just with the completion toggle already marked and the results option showing (normally only shows if the task gets marked as complete by way of a show_if statement):

mykrobinson_1-1673976427326.png

Saving the form after completion does take care of most of the steps, but the part that is missing is actually marking the idea as complete. In the screenshot above, the Results value of Success, Failure, or Inconclusive.

I have an action set to trigger when a form is saved called RefAction_Mark Idea as Completed, and this action should only trigger if the idea's [task completed] value is equal to yes/true

mykrobinson_2-1673976950917.png

 

The "Set Status to Completed" action is actually on the ideas_db table, whereas the above reference action is triggered on form submission against the idea_notes_db

mykrobinson_3-1673977151516.png

that last part is supposed to set the value of [results] in the ideas_db table based on the most recent related idea_notes_db entry for that idea_id, where [task completed]=yes:

mykrobinson_4-1673977304908.png

but this part is not happening, and i cannot figure out what i've done wrong, at least not after staring at if for a little while, because it passes validation and looks like it should work.

Any ideas?

thanks

 

 




Solved Solved
0 3 75
1 ACCEPTED SOLUTION

I would use INPUT() through your ref action, instead of looking up the latest value from the data change action.

But for troubleshooting your setup, does the LOOKUP expression produce the correct results when testing through the expression assistant?

An unrelated suggestion/advice, stop using [_THISROW] where it is not necessary, such as these 2 spots:

Marc_Dillon_0-1673980413934.png

 

View solution in original post

3 REPLIES 3

I would use INPUT() through your ref action, instead of looking up the latest value from the data change action.

But for troubleshooting your setup, does the LOOKUP expression produce the correct results when testing through the expression assistant?

An unrelated suggestion/advice, stop using [_THISROW] where it is not necessary, such as these 2 spots:

Marc_Dillon_0-1673980413934.png

 

had to do some homework to learn about the Input() function, but that worked well. I removed the results option from the note and instead pushed the Input() function to allow the user to input the results upon record save, as you noted, and it worked fine. It also pushed the data to the app audit chat. I have some JSON formatting to fix, but otherwise, it's alive.

thank you!


mykrobinson_0-1673983335754.png

 

@Marc_Dillon also, you asked if the expression test results work out, and they do not ๐Ÿค”

I am curious to dig into this further and figure out where the expression is wrong, might learn something

LOOKUP(
MAXROW(
"idea_notes_db","timestamp",AND([idea_id]=[_THISROW].[idea_id],[task completed]="yes"))
,"idea_notes_db", "idea_id","results_if_completed"
)

Dropping this here for myself for later reference, documenting the actual text instead of just a screenshot. 

Top Labels in this Space