How to add multiple if condition in the IF activity of uipath studio?

How can I add a if condition saying if row.item(“21-A Factuer O/N”).tostring > 0 and row.item(“14-Interruption Mandat”).Tostring date in this column is greater than New DateTime(Now.Year, Now.Month,1).AddDays(-1).AddMonths(-1).tostring(“dd.MM.yyyy”) or if the date in this column is empty => then do some specific actions

@mce

You can try this expression

If(
    CDbl(row.Item("21-A Factuer O/N").ToString) > 0 AndAlso
    (
        String.IsNullOrEmpty(row.Item("14-Interruption Mandat").ToString) OrElse
        CDate(row.Item("14-Interruption Mandat").ToString) > New DateTime(Now.Year, Now.Month, 1).AddDays(-1)
    ),
    "Do Specific Actions",
    "Do Something Else"
)
1 Like

Hi @mce

Pls try this

If CDbl(row(“21-A Factuer O/N”).ToString) > 0 AndAlso (String.IsNullOrWhiteSpace(row(“14-Interruption Mandat”).ToString) OrElse CDate(row(“14-Interruption Mandat”).ToString) > New DateTime(Now.Year, Now.Month, 1).AddDays(-1).AddMonths(-1)) Then

Happy Automation

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.