Hello,
I am scratching my head trying to find an expression to return a null value as TBC but if the value is not null return a date with date formatting.
Any suggestions?
I want to avoid using a condition if possible.
Many thanks in advance.
Solved! Go to Solution.
Hi @kcg633755 ,
I have made a test on my side to create a "DueDateW" column, you could refer to my flow with expression as below:
The expression in the Compose as below:
if(empty(triggerBody()?['DueDateW']),'TBC',formatdatetime(triggerBody()?['DueDateW'],'dd/MM/yyyy'))
When I create a item in the list and the "DueDateW" column's value is null, the flow would run successfully as below:
When I create a item in the list and have value in the "DueDateW" column, the flow would run successfully as below:
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is the expression I am using at the moment, it is causing the flow to crash...
@kcg633755 wrote:Hello,
I am scratching my head trying to find an expression to return a null value as TBC but if the value is not null return a date with date formatting.
Any suggestions?
I want to avoid using a condition if possible.
Many thanks in advance.
This is the message I get
Hi @kcg633755 ,
I have made a test on my side to create a "DueDateW" column, you could refer to my flow with expression as below:
The expression in the Compose as below:
if(empty(triggerBody()?['DueDateW']),'TBC',formatdatetime(triggerBody()?['DueDateW'],'dd/MM/yyyy'))
When I create a item in the list and the "DueDateW" column's value is null, the flow would run successfully as below:
When I create a item in the list and have value in the "DueDateW" column, the flow would run successfully as below:
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
36 | |
21 | |
19 | |
14 | |
11 |
User | Count |
---|---|
26 | |
20 | |
20 | |
14 | |
12 |