Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

current day logic

Hi all,

Antonio Mancini

I have a scenario like below  attached with sample data and with example.

and how can set the day of the week  ?  how to this in scripting?  and in  front end how to approach?

Thanks

Sonica

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Sony,

if Today() =6 then DaysDuration >= 4  or <=4?

If(Match(Num(WeekDay(Today()))+1,1,2,3,7),Only({<DaysDuration={'>5'}>} DaysDuration),
If(Match(Num(WeekDay(Today()))+1,4,5),Only({<DaysDuration={4,5}>} DaysDuration),
Only({<DaysDuration={'<=4'}>} DaysDuration)))

View solution in original post

28 Replies
d_prashanthredd
Creator III
Creator III

Hi,

Use the below expression..

=if(match(num(weekday(Today(1))),1,2,3,7), if([timeduration(in days)]>5, 'More Than 5 Days'),

    if(match(num(weekday(Today(1))),4,5), if([timeduration(in days)]>3, 'More Than 3 Days'),

        if(match(num(weekday(Today(1))),6), if([timeduration(in days)]=4, '4 Days or More'))

    )

)

antoniotiman
Master III
Master III

Hi Sony,

if Today() =6 then DaysDuration >= 4  or <=4?

If(Match(Num(WeekDay(Today()))+1,1,2,3,7),Only({<DaysDuration={'>5'}>} DaysDuration),
If(Match(Num(WeekDay(Today()))+1,4,5),Only({<DaysDuration={4,5}>} DaysDuration),
Only({<DaysDuration={'<=4'}>} DaysDuration)))

soniasweety
Master
Master
Author

thanks for quick response  prashanth and Antonio.

Give me some time I  will check and come back to this logic

d_prashanthredd
Creator III
Creator III

Also attached the sample app with your data

soniasweety
Master
Master
Author

thanks but If I want to create it backend how to create?

soniasweety
Master
Master
Author

hi Sir,

Antonio Mancini                   

if Today() =6 then DaysDuration >= 4  or <=4?

logic :for this ----> if day is 6   and duration  =4 and >4

and how to set the weekday in script?  how to use variable to set that?

antoniotiman
Master III
Master III

In Script

LET vDay = Num(WeekDay(Today()))+1;

Expression :

If(Match(vDay,1,2,3,7),Only({<DaysDuration={'>5'}>} DaysDuration),
If(Match(vDay,4,5),Only({<DaysDuration={4,5}>} DaysDuration),
Only({<DaysDuration={'>=4'}>} DaysDuration)))

soniasweety
Master
Master
Author

durat.PNGin my data it is not working sir,

in my data duration column coming as seconds so I  converted like below

  Interval([TaskDuration]/86400,'D') as Task_DurationDays,

but  I added the data through inline  like  63200   less than 10 days  but that expression is not giving the result. 

and btw  what it will give the result can you explain?

LET vDay = Num(WeekDay(Today()))+1;

soniasweety
Master
Master
Author

the above both expressions are not giving any result