I have a question regarding workflow: If I ch...

I have a question regarding workflow: If I change a column value from โ€œ0โ€ to โ€œ1โ€ and I would like to execute two Webhooks when this happens. If I create two workflows with the expression

AND([_THISROW_BEFORE].[Status]<>[_THISROW_AFTER].[Status], [_THISROW_AFTER].[Status]=โ€œ1โ€)

in each one of them, will both workflows be activated?

0 14 626
14 REPLIES 14

The answer is yes, both workflows will be executed; you could also use this expression: AND([_THISROW_BEFORE].[Status]=โ€œ0โ€, [_THISROW_AFTER].[Status]=โ€œ1โ€)

That is if [Status] is a text column; if it is number column type, you would of course remove quotation marks.

Thanks. Regarding the โ€œ1โ€ instead of 1 For some reason sometimes when I set Status to be number e.g. [Status]=1

it gives me the error: โ€œThe expression is valid but its result type โ€˜Numberโ€™ is not one of the expected types: Refโ€ I understand that status is a reference, it is a reference to a table with key of type Number, but its value is indeed 1โ€ฆ what is the issue here?

If I use โ€œ1โ€ then it does not complain. Not always this is so, any idea?

Not sure, this a completely different question than your above post, need more details, but off the top of my head, perhaps the base type in that Ref column does not match and has remained as text.

Hi @Yossi_Oulu I find you have to set the base type of the column if is going to be different from the default,

and save it and then go back and set the Ref and save it again.

@Lynn that might explain it. Thanksโ€ฆ ill try

I am currently having this same issue. Can anyone help?

In Table 1, ClientID is a number column and is the key. I am inserting this ClientID in Table 2 using an action and the ClientID there will refer back to Table 1. The action wonโ€™t deploy from a workflow because โ€œThe expression is valid but its result type โ€˜Numberโ€™ is not one of the expected types: Refโ€

I have tried setting ClientID in Table 2 to a number, saving, then changing back to ref and the problem persists. Please help.

A column of type Ref expects the key column value of the row to which youโ€™re referring. Apparently, ClientID is not the key column for its table.

See also:


But ClientID is the key column of Table 1:

Please post a screenshot of his error and the complete expression to which it refers.

Here is Table 2, showing the Reference to Table 1:

Here is the action:

Here is the error:

Ah. Hmmโ€ฆ Interesting. Iโ€™d call that a bug! Try this:

([ClientID] & "")

Thank you for your help. I worked a way around it and will just go with that

this is a bug I reported a while ago.
it pops and goes without apparent reason.
what i do to overcome it is to define a virtual field of type ref instead of the original one. and leave the real field without ref.

ื‘ืชืืจื™ืš ื™ื•ื ื”ืณ, 30 ื‘ื™ื•ืœื™ 2020, 22:11, ืžืืช Allison Romero via AppSheet Creator Community โ€<appsheet@discoursemail.com>:

Also wanted to add that I have another action that references that ClientID from table 1 in an action and there is not an error

Table 3 referencing Table 1

Action with no error in the expression - if it causes an error in Table 2, why not Table 3?

Top Labels in this Space