Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I’ve the DaysName defined in Load Script in following way:
SET DayNames ='M;T;W;Tu;F;S;S';
(This was a requirement of my client)
In my Dim_Calendar I’ve column that represents the Week Days (W_Day)
Now I have 5 buttons:
The action are ‘Alter Selection’ because I want it to be possible to select all days at same time.
Problem:
When I select the button “Thursday” or “Tuesday” it select both values ‘T’ and don’t how can I solve this…
Can anyone help me?
Many thanks!!!
Create another field in the script:
Num(WeekDay(Date)) + 1 as WeekDayNum;
and then use this for your button selections
Sample Script used:
SET DayNames='M;T;W;T;F;S;S';
Table:
LOAD WeekDay(Date) as WeekDay,
Date,
Num(WeekDay(Date)) + 1 as WeekDayNum;
LOAD Date(Today() + RecNo() - 1) as Date
AutoGenerate 50;
Why don't you select Tu for Thursday?
Thursday
Hi Sunny T,
I propose that to my client, but he wants that distribution (M;T;W;T;F)
But up top you have this in your post:
SET DayNames ='M;T;W;Tu;F;S;S';
Thursday seems to be Tu
Sorry, my mistake....
I copy the last proposal that have the 'Tu' for Tuesday.
The current script is:
SET DayNames ='M;T;W;T;F;S;S';
It's not quite clear to me how these weekdays will be displayed and selected (beside the why - making easy things complicated)? But anyway, some thoughts which might be useful:
- using from dual-fields with overlapping string-values and different numeric values
- extending the field-values to zero white-space characters
- using from Current Selection Alternatives
- Marcus
Create another field in the script:
Num(WeekDay(Date)) + 1 as WeekDayNum;
and then use this for your button selections
Sample Script used:
SET DayNames='M;T;W;T;F;S;S';
Table:
LOAD WeekDay(Date) as WeekDay,
Date,
Num(WeekDay(Date)) + 1 as WeekDayNum;
LOAD Date(Today() + RecNo() - 1) as Date
AutoGenerate 50;