Call a process - Documentation Clarification

elco
New Member

The entire documentation for this step type is:

Call a process
This step type allows you to invoke another process within the same application. You can pass data to the process being invoked using literal values or expressions.

I need more explanations what the following mean: โ€˜Add or lookup process input?โ€™

  1. Add: A new record will be created using the data you supply. If another record exists with the same primary key, that record will be updated and used.
    a. Where will this record be created? You never reference table?
    b. What about returned results? How do you use those variables as input?

  2. Lookup: The record will be retrieved using the primary key. Any additional columns will be used to update the record.
    a. Primary key from where and to where?
    b. What happens to columns which you donโ€™t specify?

4 11 1,803
11 REPLIES 11

I think you are talking about this?

This thread would probably be better served in the #appsheet-automation channel.

The Process that you are calling will be attached to a Table.

Donโ€™t know. This part may still be a work-in-progress.

The primary key of the record that you are looking up, from the table that the Process you are calling is attached to.

Nothing.

@elco Did you ever get better information as to how variables are passed in and out? I am in the same boat as you. The documentation leaves a lot to be desired.

@Marc_Dillon Do you have insight as to how variables are passed into the โ€œcalled processโ€? I have post with a more specific example here if you would like the nitty gritty details. I am specifically trying to understand the syntax used to use the variable inside the called process.

Thank you!

Nope

Steve
Platinum 4
Platinum 4

Former Community Member
Not applicable

Thanks @Steve for flagging this, for some reason I missed this post. My answers are inline (I have also updated the help article) :

  1. Add: A new record will be created using the data you supply. If another record exists with the same primary key, that record will be updated and used.
    a. Where will this record be created? You never reference table?

This record will be created (or updated if an existing record with the id already exists) in the table configured as the input table(entity) in the process that is being called.

b. What about returned results? How do you use those variables as input?

Assuming in this case you are referring to a prior โ€œCall processโ€ step in this process (lets say โ€œCall process 1โ€) whose return values you would like to use as inputs to the current โ€œCall processโ€ step (lets say โ€œCall process 2โ€). If so the format you will use in the current step input field would be [Call process 1].[Approval] assuming Approval is one of the โ€œReturn valuesโ€ step in the process that is being called via โ€œCall process 1โ€.

  1. Lookup: The record will be retrieved using the primary key. Any additional columns will be used to update the record.
    a. Primary key from where and to where?

Primary key for the row of table (t1) that is the input table(entity) of the process (p2) that is being called in this step of the current process (p1). The key can be an expression that refers to any column of the row of the table that is the input entity to the current process (p1).

b. What happens to columns which you donโ€™t specify?

If the row was successfully looked up (assuming a valid key was specified) then if any columns are specified, they are used to update that row. If no columns are specified, that row is only looked up and no updates are performed.

@prithpal This all seem very complicated. I have a process that works off a table. I have an event that works off a different table. When the event triggers, I want a process to call the process that works off the other table. Isnโ€™t that simple? Iโ€™m not grasping why I would want to start manipulating data during a process call. The process Iโ€™m calling has already been setup to manipulate the data as I need. Can I not just call the process and have it run and thatโ€™s it? Simple.

Hi Shawn, did you ever get any clarity on this?  I have the same simple requirement - data change in table A trigger bot working against Table B.

@Ed_Cottrell I didn't see you reply.  I still do not quite understand how calling a process works and is intended to be used.  I think I became more comfortable using actions for performing an action on a set of rows and ended up working around my lack of understanding.

I am now scratching my head understanding this too.

For example, I have a reusable process that simply triggers recalculation of formulas by incrementing an [UPDATE_TRIGGER] column of that table ([UPDATE_TRIGGER]=[UPDATE_TRIGGER]+1)

JPAlpano_0-1660620501301.png

JPAlpano_1-1660620530651.png

Now in my Bot, I call this reusable process:

JPAlpano_2-1660620623446.png

JPAlpano_3-1660620649376.png

What am I missing here?

Add:
Why would I want to add or update new rows in this process?  If I wanted that, then I could have just used the data action Add new rows or Set row values.

Lookup:
What?  Shouldn't the bot already know which rows to run the process based on which row was added/updated/deleted since it's the row that triggered the bot?

@Former Community Member 

If i understand correctly, this is my point of view. 

Call a process similar to an Behaviour action: "Data: execute an action on a set of rows".

And Process is like Behaviour: grouped action.

You cannot stack a grouped action/Process by a group event trigger, but you can with a "Data: execute an action on a set of rows/Call a process" in between. Its like you cant go Many-to-Many directly, but rather, Many-to-One-to-Many

So in hindsite EVENT will return Many = Triggered event condition that returns a list of Reference ID invoked by your [UPDATE_TRIGGER].

And Call a process is a One = asking for each of the Event (that returns many) is weather the process (a) Adds: into a new ID triggered by the event or (b) Lookup: update an existing reference ID triggered by the event. 

since you chose (B) the most probable expression is just [Your_table_ID] of the targert. 

Another way of looking at it is a condition:(Event trigger condition returns many) of a condition:(Call a process condition returns one). 

 

Steve
Platinum 4
Platinum 4

Automation is junk.

Top Labels in this Space