Writing complex expressions in easymorph process

Hi Team,

We have requirement to write below expression in modify column field. I have tried using ‘Rule’ action but not well suited for this expression. Please let know how can be accomplished this in easyMorph.

IF(asText({AmoutType})=‘Amount’)
{
IF(asnumber(left({Natural Account},1)) >= 6)
{
IF(asnumber({Profit Center}) > 0)
{
asText({Profit Center})
}
else
{
asText(“0000”)
}
}
IF(asnumber(left({Natural Account},1)) <= 5)
{
asText(“0000”)
}
}
IF(asText({AmoutType})=‘Markup Amount’)
{
SET asText({Natural Account}) = asText({‘61900000’})
IF(asnumber({Profit Center}) > 0)
{
asText({Profit Center})
}
else
{
asText(“0000”)
}
}
IF(asText({AmoutType})=‘GST_VAT Amount’)
{
asText(“0000”)
}

Thanks,
Mahantesh

You can use the IF operator (more readable), or the if() function to write conditional expressions in EasyMorph in actions such as “Create new column(s)” or “Modify column(s)” or any other action that uses expressions.

PS. I highly recommend going through our tutorial. It has, for instance, an article on expressions.