Form Save Action not Working

I have a form save action that when tested at an individual level is working, however when i save a form, the action is not performing as expected, and i can't quite figure out why.

Let me try to explain the situation.

I have a table called TCM_Encounter that is to act as a parent to subsequent rows that will document TCM communication attempts to patients. Not that its relevant to, but TCM is transitional care management, and we have two business days to attempt to contact patients who were recently discharged to get them scheduled for follow up appointments. If you make two attempts but are unsuccessful, the insurance company will still pay some sort of a fee for the attempts, with the overall intention being to help control preventable hospital readmissions. 

The TCM_Encounter table has a "Call Counter" column. I want the Call Counter value to be incremented by 1 for each attempt, with the intion of automatically closing an encounter once the second attempt is logged, whether the attempt is successful or not.

So i created this action:

mykrobinson_0-1686155492682.png

I have this set as the action to run when a new TCM_Communication record is saved, and it triggers the ref action Increment Call Counter on the parent TCM Encounter record, or at least it should ๐Ÿค”

mykrobinson_1-1686155682758.png

and testing the action, it works:

mykrobinson_2-1686155757486.png

Except it isn't actually triggering when the form is saved... What am i doing wrong? Since it works in testing, my assumption is that the action may be firing before the record is actually created, or something to that effect. I suppose i could move the action to a bot instead of a form save action. Would that be a preferred method, or will this add more processing/sync time for things to finish?

Thanks

 




0 5 347
5 REPLIES 5

I see nothing indicative of a problem.

Have you actually set the action as the form saved behavior?
Have you confirmed the form you're seeing is the same form where you've set the form saved behavior?
If TCM_Encounter is a parent of TCM_Comm, don't you have a [TCM_Encounter] Ref column that you can use for the 'referenced rows' setting?
What is the definition of that [Last TCM Encounter] column?

Moving it to a Bot is certainly a perfectly valid option.

in theory, i am using the ref column, but perhaps its not targeting appropriately.

[Last TCM Encounter] is a virtual column in the Patients table and is defined as:

lookup(maxrow("tcm encounter", "timestamp", ([Patient]=[_thisrow].[_patientIdentifier])),"tcm encounter","ID", "ID")



but to your point, if i already have the ref column in the TCM_Communication record, i could try targeting LIST( [TCM Encounter].[ID]) instead and see if that makes a difference

I confirmed the correct form has the form saved action associated:

mykrobinson_0-1686160197685.png

 

UPDATE: I had it work once after changing the referenced rows, as noted above. The test even with the previous expression for referenced rows worked (meaning clicking the test option when entering the expression) but for some reason the action didn't seem to complete. Any ideas there? 

I'll do more testing and make sure it continues to work, because at this stage, it just make sense to me why it didn't previously.


lookup(maxrow("tcm encounter", "timestamp", ([Patient]=[_thisrow].[_patientIdentifier])),"tcm encounter","ID", "ID")

 


That LOOKUP() portion is useless, it's literally returning the same thing as just the MAXROW() by itself.

 

LIST( [TCM Encounter].[ID])


The ".[ID]" portion is also useless.

 

Do any of your actions have behavior conditions?

 

 

negative