Dropdown menu Issue

Ok so this is weird, i decided to do the same method on a different data base, it works just fine, drop down menu works and sorts based on my selection, the only thing doesn’t work is the “all” option, when clicked it shows nothing. what can cause that?

If you still have the shift binding like this:

switch({Root Container.Dropdown.selectedLabel}, "A","B","All", "AND twelve_hour_shifts = 'A'", "AND twelve_hour_shifts = 'B'", "AND twelve_hour_shifts = 'A' && 'B'", "")

It may need to go back to:

switch({Root Container.Dropdown.selectedLabel}, "A","B","All", "AND twelve_hour_shifts = 'A'", "AND twelve_hour_shifts = 'B'", "")

What troubles me is why the drop down menu stops functioning, I mean its obviously working when changing that values from A to B or back to A, it sorts the table correctly but needs to be done manually not through the drop down since that thing stops working and can’t make any selections.

Hey Jordan, so how about a different approach, what if I just create the drop down and don't give it a property instead just go in the dataset viewer of the drop down and add 3 labels, A,B,All and give them values of 0,1,2 now my question is, can you possibly mix expression with query? or is there a way to use IF ELSE in my query? I was thinking about using something like this:

I was looking around and looks like you can use "Case" to work like IF ELSE but never used it before... maybe something like:

SELECT Current_Part_Number, Current_Running_Percentage, On_Time_Percentage, Over_Cycle_Time, Over_seconds_for_current_part, t_stamp, twelve_hour_Shifts, Total_Part_CycleTime, Color_Code

    CASE
        WHEN (twelve_hour_Shifts = 'A') 
            
        WHEN (twelve_hour_Shifts = 'B') 
            
        WHEN (twelve_hour_Shifts = 'C') 
            
        ELSE twelve_hour_Shifts = All' 
    END 
FROM
    JK_LH_Monthly

Am i on the right track?

Ok so i took a different approach, I added A,B,C,All to my drop down data set since those are all the options available and then did this query:

SELECT 
	t_stamp,
	Current_Part_Number, 
	twelve_hour_Shifts,
	 
FROM JK_LH_Monthly
WHERE
	twelve_hour_Shifts = '{Root Container.Dropdown.selectedStringValue}'  AND (t_stamp BETWEEN '{Root Container.Day.date}' AND '{Root Container.Day 1.date}

this works perfect if I select A or B or C, the only problem I have is when i select “All” since there is not such entry in the shift column so it shows blank. any suggestions? maybe say above code is good but if [code]
twelve_hour_Shifts = ‘All’ then

SELECT
t_stamp,
Current_Part_Number,
twelve_hour_Shifts,

FROM JK_LH_Monthly
WHERE
t_stamp BETWEEN ‘{Root Container.Day.date}’ AND '{Root Container.Day 1.date}

[/code]
Which will give me everything , Shift A,B,C all together.

Another Update for those who maybe curious on how this works(I used the approach i mentioned in my last post above), got it figured out. this is the query i used on the table and the drop down works like a charm.


if('{Root Container.Dropdown.selectedStringValue}' = 'All')
	SELECT 
		t_stamp,
		Current_Part_Number, 
		twelve_hour_Shifts,
		
	FROM 
     JK_LH_Monthly
	WHERE
		t_stamp BETWEEN '{Root Container.Day.date}' AND '{Root Container.Day 1.date}';
	
	Else 
		SELECT 
			t_stamp,
	      Current_Part_Number, 
	      twelve_hour_Shifts,
		FROM 
             JK_LH_Monthly
		WHERE
			twelve_hour_Shifts = '{Root Container.Dropdown.selectedStringValue}'  AND 
(t_stamp BETWEEN '{Root Container.Day.date}' AND '{Root Container.Day 1.date}');
	

Thanks for all the help! much appreciated!