Action > Behaviour and IFS condition

I've this action:

Screenshot 2023-06-09 alle 20.11.44.png

With this Behaviour to show this button only in one specific slice:

Screenshot 2023-06-09 alle 20.11.32.png

In my data validity SCADENZA column i've this valid if (the SCADENZA cannot be on Saturday / Sunday)

AND(OR([SCADENZA]>[DA FARE],[SCADENZA]=[DA FARE]),ISNOTBLANK([DA FARE]),NOT(
IN(
WEEKDAY([SCADENZA]),
LIST(1, 7)
)
))

Now how to setup (in action > behaviour with a IFS condition ?) a rule to SCADENZA = TODAY () + 3 instead of TODAY () + 1 to move all my undue SCADENZA to Monday (instead of tomorrow cause Saturday is not allowed) ?

 

 

โ€ƒ

Solved Solved
0 9 181
1 ACCEPTED SOLUTION

Please try in the set the value setting of the column [SCADENZA]

IFS( IN(WEEKDAY([SCADENZA]), LIST(1,  2 , 3 , 4 , 5 )), [SCADENZA]+1,

      WEEKDAY([SCADENZA])=6, [SCADENZA]+3,

      WEEKDAY([SCADENZA])=7, [SCADENZA]+2,

     )

 

or depending on your use case it could be 

IFS( IN(WEEKDAY([SCADENZA]), LIST(1,  2 , 3 , 4 , 5 )), TODAY()+1,

      WEEKDAY([SCADENZA])=6, TODAY()+3,

      WEEKDAY([SCADENZA])=7, TODAY()+2,

     )

 

or yet another possible use case could be

IFS( IN(WEEKDAY(TODAY()), LIST(1,  2 , 3 , 4 , 5 )), TODAY()+1,

      WEEKDAY(TODAY())=6, TODAY()+3,

      WEEKDAY(TODAY())=7, TODAY()+2,

     )

Edit: Made changes to the expression.

 

View solution in original post

9 REPLIES 9

Please try in the set the value setting of the column [SCADENZA]

IFS( IN(WEEKDAY([SCADENZA]), LIST(1,  2 , 3 , 4 , 5 )), [SCADENZA]+1,

      WEEKDAY([SCADENZA])=6, [SCADENZA]+3,

      WEEKDAY([SCADENZA])=7, [SCADENZA]+2,

     )

 

or depending on your use case it could be 

IFS( IN(WEEKDAY([SCADENZA]), LIST(1,  2 , 3 , 4 , 5 )), TODAY()+1,

      WEEKDAY([SCADENZA])=6, TODAY()+3,

      WEEKDAY([SCADENZA])=7, TODAY()+2,

     )

 

or yet another possible use case could be

IFS( IN(WEEKDAY(TODAY()), LIST(1,  2 , 3 , 4 , 5 )), TODAY()+1,

      WEEKDAY(TODAY())=6, TODAY()+3,

      WEEKDAY(TODAY())=7, TODAY()+2,

     )

Edit: Made changes to the expression.

 

Hi @Suvrutt_Gurjar thanks for the reply,

do you mean here, is it correct ?

Screenshot 2023-06-10 alle 10.41.31.png

Having this other conditions at the beginning how should add your expression to the first conditions ?

AND(OR([SCADENZA]>[DA FARE],[SCADENZA]=[DA FARE]),ISNOTBLANK([DA FARE]),NOT(
IN(
WEEKDAY([SCADENZA]),
LIST(1, 7)
)
))

โ€ƒ

I suggested the expression(s) for the action 's "set the values of some columns' in this row setting for the column [SCADENZA]

I hope that is what you are looking for- to set [SCADENZA] date to the next day if today is Sunday to Thursday, to Monday's date if today is Friday or Saturday , correct?

Additionally, in the action's "only if this condition is true" setting ,  you could try the following expression 

AND(OR([SCADENZA]>[DA FARE],[SCADENZA]=[DA FARE]),ISNOTBLANK([DA FARE]), CONTEXT("View")="SCADENZA OGGI")

 

 

I'd like to move all my tasks in SCADENZA today (when i'm on friday to monday), when the task are in the other day move on tomorrow.

so i'd like to use 'Execute an action on the set of row' even if the SCADENZA OGGI is a slice ... 

Thank you. I believe I have suggested expressions for those conditions only. You could try any one of the three suggested  expressions based on your use case in the "set the values of some columns in this row". 

Additionally, in the action's "only if this condition is true" setting ,  you could try the following expression 

AND(OR([SCADENZA]>[DA FARE],[SCADENZA]=[DA FARE]),ISNOTBLANK([DA FARE]), CONTEXT("View")="SCADENZA OGGI")

But if i would setup "Execute an action on the set of row" all of that, i see that there's no possibility to choose Slice but only Table, in this case how to proceed ?

In actions you can only define tables. So you can mention the  table in the action on which the slice is created.

If you wish to superficially assign that action to a slice , please use the below setting in the slice to allocate the desired actions to the slice.

Generally to restrict a data change actions only to rows of the slice, you could also add the slice filter expression to the  "only if this condition is true" setting of the action. That will ensure the action is available only to rows in the slice.

Suvrutt_Gurjar_0-1686397240052.png

 

=IFS(
AND(
OR([SCADENZA]>[DA FARE], [SCADENZA]=[DA FARE]),
ISNOTBLANK([DA FARE]),
NOT(IN(WEEKDAY([SCADENZA]), LIST(1, 7)))
),
[SCADENZA],
AND(
OR([SCADENZA]>[DA FARE], [SCADENZA]=[DA FARE]),
ISNOTBLANK([DA FARE]),
WEEKDAY([SCADENZA])=6
),
[SCADENZA] + 3,
AND(
OR([SCADENZA]>[DA FARE], [SCADENZA]=[DA FARE]),
ISNOTBLANK([DA FARE]),
WEEKDAY([SCADENZA])=7
),
[SCADENZA] + 2,
TRUE,
[SCADENZA] + 1
)

Hi Sirfyaad, thanks for the reply, i receive this error:

The expression is valid but its result type 'Date' is not one of the expected types: Yes/No, List

Is it correct to insert that in Valid if formula for column SCADENZA ?

Screenshot 2023-06-10 alle 12.18.07.png

 

โ€ƒ

Top Labels in this Space