i am in the discovery phase of project where a potential custumer has the need to inform the salesperson if the chosen date on a datepicker control is the correct weekday for the scheduled deliveries in the area of that customer. I set an example:
Client A is located in the province "PD", in this area deliveries are scheduled to be made only on Wednesday and Friday. On the account record we set a lookup to a table called Province where each record is a match between the Province (i.e. "PD") with the possible days of delivery in that area (i.e. WED & FRI), the days are part of a global option set called Weekdays.
Therefore the big request is to guide the user in choosing only the correct weekday for that area.
Open to any of your suggestions as how to best approach this scenario.
If(Weekday(DatePicker1.SelectedDate) in AddColumns(ComboBox1.Selected.Weekdays,"Test",If(Text(ThisRecord.Value)="Sunday",1,Text(ThisRecord.Value)="Monday",2,Text(ThisRecord.Value)="Tuesday",3,Text(ThisRecord.Value)="Wednesday",4,Text(ThisRecord.Value)="Thursday",5,Text(ThisRecord.Value)="Friday",6,Text(ThisRecord.Value)="Saturday",7)).Test,DisplayMode.Edit,DisplayMode.Disabled)
7\ Add a label control and set its Text property to:
If(Button1.DisplayMode=DisplayMode.Disabled&&!IsBlank(ComboBox1.Selected),"You could only choose "&Concat(ComboBox1.Selected.Weekdays,Text(Value),","),"")
8\ The result is as follows:
Best Regards, Wearsky If my post helps, then please consider Accept it as the solution to help others. Thanks.