Home > Forum > Actions > How to get previous action

How to get previous action
1

Hi Guys,
knowing i am a newbie, i just have a maybe quite simple question.
Can i get the ID of the 'calling' action on the entry path of an action?
Would like to check which ist the caller and depending on the result send an email or not. Thats it ;-)
Thanks for some hints, Gerd

MVP

Hi Gerd,

welcome to the community. :)

I'm not sure that I understand what you mean with "calling" action. First of all a little naming clarification which:
- We have paths which lead from on step to another.
- Each path has a automation which can execute other automations.
- An automations is build from actions.
- Automations can have input/output and local parameters

I'm assuming that you mean with "calling action" the path, on which a user clicked/is executed in a timeout or similar. We can get the "current" path from the values tab of the expression editor.
If you actually want to execute an action based on some information, I would pass this information using parameters.


On additional "naming" information.
The word "field" is used in English , but it in Polish it's an attribute. So you may sometimes read field or attribute in this forum. Both are referring to the same, in most cases. :)
I have no idea how the translation is in German, I prefer using everything in English. It makes it easier to find something. :)

Best regards,
Daniel

In reply to: Daniel Krüger (Cosmo Consult)

Hi Gerd,

welcome to the community. :)

I'm not sure that I understand what you mean with "calling" action. First of all a little naming clarification which:
- We have paths which lead from on step to another.
- Each path has a automation which can execute other automations.
- An automations is build from actions.
- Automations can have input/output and local parameters

I'm assuming that you mean with "calling action" the path, on which a user clicked/is executed in a timeout or similar. We can get the "current" path from the values tab of the expression editor.
If you actually want to execute an action based on some information, I would pass this information using parameters.


On additional "naming" information.
The word "field" is used in English , but it in Polish it's an attribute. So you may sometimes read field or attribute in this forum. Both are referring to the same, in most cases. :)
I have no idea how the translation is in German, I prefer using everything in English. It makes it easier to find something. :)

Best regards,
Daniel

Hi Daniel,

thanks for you answer and sorry for the incorrect wording ;-)

Yes i meant that i want to know which path was used to enter a WF-Step. I now try to implement it with parameters and a business rule...
Therefore i found following info in the community:
https://community.webcon.com/posts/post/parameters-in-business-and-form-rules/372
In there is an explanation für a business rule "Path was used" which seems to be hat i need.
Am i right, that the SQL-Command returns "1" for each PathId ever used in die actual Instance? If so, how can i verify only against the last used PathID?

Attached you see what i did in the excecution condition of the Mail-Action.
Think this should work if i only get a "1" for the last PathID.

Best regards, Gerd

MVP
In reply to: Gerd

Hi Daniel,

thanks for you answer and sorry for the incorrect wording ;-)

Yes i meant that i want to know which path was used to enter a WF-Step. I now try to implement it with parameters and a business rule...
Therefore i found following info in the community:
https://community.webcon.com/posts/post/parameters-in-business-and-form-rules/372
In there is an explanation für a business rule "Path was used" which seems to be hat i need.
Am i right, that the SQL-Command returns "1" for each PathId ever used in die actual Instance? If so, how can i verify only against the last used PathID?

Attached you see what i did in the excecution condition of the Mail-Action.
Think this should work if i only get a "1" for the last PathID.

Best regards, Gerd

Hi Gerd,


yes, the history table contains all path which have been used. In your case you can probably use the Current Path Id from the left side of my screenshot. That’s the path which triggered the transition from one step to another.
The only exception would be if you have for example a flow control in between your steps. Than you would have the value of the path of the flow control.


I currently don’t have a system available so I can’t check what the best option would be if you need to use the history table.

Maybe something like
Select top 1 PATHID
where STPID = the step you at looking for
Order by Row_ID descending

I’m sorry but I don’t use the table on a regular basis so I don’t know the columns. :)

Best regards,
Daniel