Chained/Multiple Expressions

Hello there,

is it possible to write something like this:

${security.user.name == this.bank.CHANGED_UID} && ${p_StatusFrei != this.bank.Status_CFK}
in an expression for data-bind "Disabled" to a button?

It´s described similarly here: Expressions (Angular) - but only for TypeScript code.

It works perfect as long as I do not use a 2nd or 3rd clause in my expression.

Thanks in advance,

Martin

Hi @mkfromhighlands,

In my opinion the expression should be:
${security.user.name == this.bank.CHANGED_UID && p_StatusFrei != this.bank.Status_CFK}

Thanks again for the superfast answer, youre right - partial expression should be enclosed in ${} - but it doesnt work either.

Expression works as long as only one partial expression matches, so I suspect there is a problem with the chaining...

How does the generated code look like? A possible workaround is to use a page property set to the desired expression and then use that property to data-bind the Disabled property.

Expression is:

${security.user.name == this.bank.CHANGED_UID || p_StatusFrei != this.bank.Status_CFK}

Generated code looks like this:

....buttonType="button" [disabled]="(security?.user?.name == bank?.CHANGED_UID) || (p_StatusFrei != bank?.Status_CFK)"...

Works fine, thanks.

How would it be possible to get the desired expression into a page property? Do I have to follow a certain syntax or sth?

The exact same syntax should work. Just paste it in the Value textbox when creating the Set property action.

Thank you, works fine!