
I have an icon that Changes from an X to a Check if the statement is true or not., depending on date selected from datepicker and if a condition is met from a Collect.
What I would like, is to use the same icon for all 4 quarters depending on what is chosen from the datepicker.
Working statement is below.
If(LookUp(Collect1stQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1))
Possible to use something like this? I am stumped.
Thanks for any insight!! 😊
If(LookUp(Collect1stQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1),
LookUp(Collect2ndQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1),
LookUp(Collect3rdQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1),
LookUp(Collect1stQTRTWS,RoundUp(Month(DatePicker1.SelectedDate)/1,0)&&Year(CompletionDate)=Year(DatePicker1.SelectedDate)&&Status=5, true ),RGBA(99,139,44,1),RGBA(168,0,0,1))
When you chain multiple If conditions, you are only focused on the true factor, the "else" (false factor) would be the last parameter of your If statement.
So, your formula would be the following:
If(
LookUp(Collect1stQTRTWS, RoundUp(Month(DatePicker1.SelectedDate)/1,0) &&
Year(CompletionDate)=Year(DatePicker1.SelectedDate) &&
Status=5, true ), RGBA(99,139,44,1),
LookUp(Collect2ndQTRTWS, RoundUp(Month(DatePicker1.SelectedDate)/1,0) &&
Year(CompletionDate)=Year(DatePicker1.SelectedDate) &&
Status=5, true ), RGBA(99,139,44,1),
LookUp(Collect3rdQTRTWS, RoundUp(Month(DatePicker1.SelectedDate)/1,0) &&
Year(CompletionDate)=Year(DatePicker1.SelectedDate) &&
Status=5, true ), RGBA(99,139,44,1),
LookUp(Collect1stQTRTWS, RoundUp(Month(DatePicker1.SelectedDate)/1,0) &&
Year(CompletionDate)=Year(DatePicker1.SelectedDate) &&
Status=5, true ), RGBA(99,139,44,1),
RGBA(168,0,0,1)
)
The syntax is: If( Condition1, ThenResult1 [, Condition2, ThenResult2, ... [ , DefaultResult ] ] )
As it was in your formula, your Condition2 (for example) was an RGBA function.
I hope this is helpful for you.