Alpha Video Training
Results 1 to 11 of 11

Thread: what am I doing wrong with this {condition} in a dialog?

  1. #1
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    791

    Post what am I doing wrong with this {condition} in a dialog?

    Trying to create a conditional display on a dialog, when I click on a radio box above the line, I want to then display further choices depending on which option is selected:
    Code:
    varC_result = ui_dlg_box("Listings",<<%dlg%
    {Background=#153+204+255}
    {region}
    (vOpt:Class)|
    (vOpt:Code)|
    (vOpt:Date)|
    (vOpt:Find by Fragment)|
    (vOpt:Group)|
    (vOpt:Location);
    (vOpt:Operator Name)|
    (vOpt:Production List)|
    (vOpt:Reg)|
    (vOpt:Type)|
    (vOpt:Usage);
    {line=6,0};
    {condition=(vOpt="Find by Fragment")}
    (FindOpt:Aircraft);
    (FindOpt:Base);
    (FindOpt:Operator);{endregion};
    {condition=.t.}
    {endregion}
    ; 
    {region};
    {lf}
    {endregion};
    {line=1,0};
    {region}
    {justify=center}
    <*OK!OK> <Cancel!CANCEL>
    {endregion};
    %dlg%)
    ... do things
    in this example if I select "Find by Fragment" I want to display three further options "Aircraft", "Base" and "Operator"
    Last edited by Graham Wickens; 08-19-2019 at 05:52 PM. Reason: Correct error
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  2. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: what am I doing wrong with this {condition} in a dialog?

    You either have to set a_dlg_button to blank when you press "Find by Fragment" or make the dialog modeless so it doesn't close automagically.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    791

    Default Re: what am I doing wrong with this {condition} in a dialog?

    I think I got the first part working properly, but when I add options for other Radio choices the formatting goes haywire!, how do I get The next lot of conditional displays to start in the same position each time?

    Code:
    varC_result = ui_dlg_box("Listings",<<%dlg%
    {Background=#153+204+255}
    {region}
    (vOpt:Class)|
    (vOpt:Code)|
    (vOpt:Date)|
    (vOpt:Find by Fragment)|
    (vOpt:Group)|
    (vOpt:Location);
    (vOpt:Operator Name)|
    (vOpt:Production List)|
    (vOpt:Reg)|
    (vOpt:Type)|
    (vOpt:Usage);
    {line=6,0};
    {endregion};
    {condition=(vOpt="Find by Fragment")}
    {region=a}
    (FindOpt:Aircraft)
    (FindOpt:Base)
    (FindOpt:Operator);{endregion};
    {endregion}
    {condition=(vOpt="Production List")}
    {region=a}
    Type:| [%@vSearchValue5_def%.40vSearchValue];
    {lf}
    Order:|
    (ProdOrder:Assembly No)
    (ProdOrder:Line No)
    (ProdOrder:Msn);
    (ProdOrder:Plane Set)
    (ProdOrder:Reg)
    (ProdOrder:Variant No);
    {endregion};
    {condition=.t.}
    ; 
    {region};
    {lf}
    {endregion};
    {line=1,0};
    {region}
    {justify=center}
    <*OK!OK> <Cancel!CANCEL>
    {endregion};
    %dlg%)
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  4. #4
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,082

    Default Re: what am I doing wrong with this {condition} in a dialog?

    Graham,

    I tested your code and works fine without any modification.

    I'd like insert more {region} ... {Endregion} if you are going to build more options.

    {region=a}
    your radio...
    {endregion};


    {region=b}
    start the conditions with another -- see " {start_pos} " help.

    {condition=(vOpt="a")} {region}... condition_dlg_A .. {endregion}
    {condition=(vOpt="b")} {start_pos}{region}... condition_dlg_B .. {endregion}
    ...

    {endrigion};

  5. #5
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,082

    Default Re: what am I doing wrong with this {condition} in a dialog?

    how do I get The next lot of conditional displays to start in the same position each time?
    --- because the {REGION= Label } ... {ENDREGION} Label name and location.

  6. #6
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    791

    Default Re: what am I doing wrong with this {condition} in a dialog?

    next effort, still erratic positioning!!
    Code:
    varC_result = ui_dlg_box("Listings",<<%dlg%
    {Background=#153+204+255}
    {region=a}
    (vOpt:Class)|
    (vOpt:Code)|
    (vOpt:Date)|
    (vOpt:Find by Fragment)|
    (vOpt:Group)|
    (vOpt:Location);
    (vOpt:Operator Name)|
    (vOpt:Production List)|
    (vOpt:Reg)|
    (vOpt:Aircraft Type)|
    (vOpt:Usage);
    {line=6,0};
    {endregion};
    {condition=(vOpt="Date")}
    {start_pos}
    {region=b}
    {DatePicker=50,15dStartDate_EmbeddedCalendar}{watch=dStartDate!update_dStartDate_EmbeddedCalendar};
    {DatePicker=50,15dEndDate_EmbeddedCalendar}{watch=dEndDate!update_dEndDate_EmbeddedCalendar};
    {endregion};
    {condition=(vOpt="Find by Fragment")}
    {start_pos}
    {region=b}
    (FindOpt:Aircraft)
    (FindOpt:Base)
    (FindOpt:Operator)
    {endregion}
    {condition=(vOpt="Find by Fragment".and.FindOpt="Aircraft")}
    {start_pos}
    {region=b}
    Type: [%@SearchValue6_def%.40vSearchValue];
    {endregion}
    {condition=(vOpt="Find by Fragment".and.FindOpt="Base")}
    {start_pos}
    {region=b}
    Base Name Fragment:| [.40varC_fragment];
    Country: [%@varC_country_def%.25,varC_country];
    {endregion}
    {condition=(vOpt="Find by Fragment".and.FindOpt="Operator")}
    {start_pos}
    {region=b}
    Operator Name Fragment:| [.40varC_fragment];
    Country: [%@varC_country_def%.25,varC_country];
    {endregion}
    {condition=(vOpt="Production List")}
    {start_pos}
    {region=b}
    Type: [%@vSearchValue5_def%.40vSearchValue];
    (ProdOrder:Assembly No)
    (ProdOrder:Line No)
    (ProdOrder:Msn)
    (ProdOrder:Plane Set)
    (ProdOrder:Reg)
    (ProdOrder:Variant No)
    {endregion}
    {condition=(vOpt="Reg")}
    {start_pos}
    {region=b}
    (vRegOpt:Multiple); 
    (vRegOpt:Old Id);
    (vRegOpt:Range);
    (vRegOpt:Single)
    {endregion}
    {condition=(vOpt="REG".and.vRegOpt="Multiple")}
    {start_pos}
    {region=b}
    Entries: [%mw%.12,15vMultiple]
    {endregion}
    {condition=(vOpt="REG".and.vRegOpt="Old Id")}
    {start_pos}
    {region=b}
    Old Id: [.12vSearchValue1]
    {endregion}
    {condition=(vOpt="reg".and.vRegOpt="RANGE")}
    {start_pos}
    {region=b}
    Start Date [.12vSearchValueStart];
    End Date   [.12vSearchValueEnd];
    {endregion}
    {condition=(vOpt="reg".and.vRegOpt="Single")}
    {start_pos}
    {region=b}
    Single: [.12vSearchValue1]
    {endregion}
    {condition=(vOpt="Code")}
    {start_pos}
    {region=b}
    Code: [.10vSearchValue];
    {endregion}
    {condition=(vOpt="Location")}
    {start_pos}
    {region=b}
    Location: [%@SearchValue6_def%.40vSearchValue]
    {endregion}
    {condition=(vOpt="Aircraft Type")}
    {start_pos}
    {region=b}
    Aircraft Type: [%@vSearchValue3_def%.40,10vSearchValue]
    {endregion}
    {condition=(vOpt="Operator Name")}
    {start_pos}
    {region=b}
    Operator Name: [%@vSearchValue2_def%.40,10vSearchValue]
    {endregion}
    {condition=(vOpt="Class")}
    {start_pos}
    {region=b}
    Class:[%@vSearchValue1_def%.40,5vSearchValue]
    {endregion}
    {condition=(vOpt="Group")}
    {start_pos}
    {region=b}
    Group: [%@vSearchValue4_def%.10vSearchValue]
    {endregion}
    {condition=(vOpt="Usage")}
    {start_pos}
    {region=b}
    Usage:[%d;O={@@}%.32,22vSearchValue^$$a_Usage];
    {endregion}
    {condition=.t.}
    ; 
    {region};
    {lf}
    {endregion};
    {line=1,0};
    {region}
    {justify=center}
    <*OK!OK> <Cancel!CANCEL>
    {endregion};
    %dlg%)
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  7. #7
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    791

    Default Re: what am I doing wrong with this {condition} in a dialog?

    Next I discovered {row} and {Col}, unfortunately this made an even bigger mess of the layout

    Code:
    varC_result = ui_dlg_box("Listings",<<%dlg%
    {Background=#153+204+255}
    {region}
    {Row1}
    {col1}(vOpt:Class){endcol}
    {col2}(vOpt:Code){endcol2}
    {col3}(vOpt:Date){endcol3}
    {col4}(vOpt:Find by Fragment){endcol4}
    {col5}(vOpt:Group){endcol5}
    {endrow1}
    {row2}
    {col1}(vOpt:Location){endcol1}
    {col2}(vOpt:Operator Name){endcol2}
    {col3}(vOpt:Production List){endcol3}
    {col4}(vOpt:Reg){endcol4}
    {col5}(vOpt:Aircraft Type){endcol5}
    {col6}(vOpt:Usage){endcol6}
    {endrow2}
    {endregion}
    {region}
    {Row3}
    {col1}{line=6,0}{endcol1}
    {endrow3}
    {endregion}
    {condition=(vOpt="reg".and.vRegOpt="RANGE")}
    {region}
    {row5}
    {col1}Start Date [.12vSearchValueStart]{endcol1}
    {endrow5}
    {row6}
    {col1}End Date   [.12vSearchValueEnd]{endcol1}
    {endrow6}
    {endregion}
    {condition=(vOpt="Date")}
    {region}
    {row4}
    {col1}{DatePicker=50,15dStartDate_EmbeddedCalendar}{watch=dStartDate!update_dStartDate_EmbeddedCalendar}{endcol1}
    {col2}{DatePicker=50,15dEndDate_EmbeddedCalendar}{watch=dEndDate!update_dEndDate_EmbeddedCalendar}{endcol2}
    {endrow4}
    {endregion}
    {condition=(vOpt="Find by Fragment")}
    {region}
    {row4}
    {col1}(FindOpt:Aircraft){endcol1}
    {col2}(FindOpt:Base){endcol2}
    {col3}(FindOpt:Operator){endcol3}
    {endrow4}
    {endregion}
    {condition=(vOpt="Find by Fragment".and.FindOpt="Aircraft")}
    {region}
    {row5}{col1}Aircraft Type: [%@SearchValue6_def%.40vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="Find by Fragment".and.FindOpt="Base")}
    {region}
    {row5}
    {col1}Base Name Fragment: [.40varC_fragment]{endcol1}
    {endrow5}
    {row6}
    {col1}Country: [%@varC_country_def%.25,varC_country]{endcol1}
    {endrow6}
    {endregion}
    {condition=(vOpt="Find by Fragment".and.FindOpt="Operator")}
    {region}
    {row5}
    {col1}Operator Name Fragment: [.40varC_fragment]{endcol1}
    {endrow5}
    {row6}
    {col1}Country: [%@varC_country_def%.25,varC_country]{endcol1}
    {endrow6}
    {endregion}
    {condition=(vOpt="Production List")}
    {region}
    {row5}
    {col1}Type: [%@vSearchValue5_def%.40vSearchValue]{endcol1}
    {endrow5}
    {row6}
    {col1}(ProdOrder:Assembly No){endcol1}
    {col2}(ProdOrder:Line No){endcol2}
    {col3}(ProdOrder:Msn){endcol3}
    {endrow6}
    {row7)
    {col1}(ProdOrder:Plane Set){endcol1}
    {col2}(ProdOrder:Reg){endcol2}
    {col3}(ProdOrder:Variant No){endcol3}
    {endrow7}
    {endregion}
    {condition=(vOpt="Reg")}
    {region}
    {row4}{col1}(vRegOpt:Multiple){endcol1} 
    {col2}(vRegOpt:Old Id){endcol2}
    {col3}(vRegOpt:Range){endcol3}
    {col4}(vRegOpt:Single){endcol4}
    {endrow4}
    {endregion}
    {condition=(vOpt="REG".and.vRegOpt="Multiple")}
    {region}
    {row5}
    {col1}Entries: [%mw%.12,15vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="REG".and.vRegOpt="Old Id")}
    {region}
    {row5}
    {col1}Old Id: [.12vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="reg".and.vRegOpt="Single")}
    {region}
    {row5}
    {col1}Single: [.12vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="Code")}
    {region}
    {row5}
    {col1}Code: [.10vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="Location")}
    {region}
    {row5}
    {col1}Location: [%@SearchValue6_def%.40vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="Aircraft Type")}
    {region}
    {row5}
    {col1}Aircraft Type: [%@vSearchValue3_def%.40,10vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="Operator Name")}
    {region}
    {row5}
    {col1}Operator Name: [%@vSearchValue2_def%.40,10vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="Class")}
    {region}
    {row5}
    {col1}[%@vSearchValue1_def%.40,5vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="Group")}
    {region}
    {row5}
    {col1}
    [%@vSearchValue4_def%.10vSearchValue]{endcol1}
    {endrow5}
    {endregion}
    {condition=(vOpt="Usage")}
    {region}
    {row5}
    {col1}[%d;O={@@}%.32,22vSearchValue^$$a_Usage]{endcol1}
    {endrow5}
    {endregion}
    {condition=.t.}
    {region}
    {row12}
    {col1}{line=1,0}{endcol1}
    {endrow12}
    {endregion}
    {region}
    {row13}
    {col1}<*OK!OK>{endcol1}
    {col2}<Cancel!CANCEL>{endcol2}
    {endrow13}
    {endregion}
    %dlg%)
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  8. #8
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,082

    Default Re: what am I doing wrong with this {condition} in a dialog?

    I hope this layout can help you


    Code:
    varC_result = ui_dlg_box("Listings",<<%dlg%
    {Background=#153+204+255}
    {region}
    (vOpt:Class)|
    (vOpt:Code)|
    (vOpt:Date)|
    (vOpt:Find by Fragment)|
    (vOpt:Group)|
    (vOpt:Location);
    (vOpt:Operator Name)|
    (vOpt:Production List)|
    (vOpt:Reg)|
    (vOpt:Type)|
    (vOpt:Usage);
    {line=6,0};
    {endregion};
    
    {region=a} {comment = start frame}
    
    {condition=(vOpt="Find by Fragment")}
    {region=a1}
    (FindOpt:Aircraft)
    (FindOpt:Base)
    (FindOpt:Operator);{endregion};
    {endregion}
    
    {condition=(vOpt="Production List")}
    	{start_pos}
    	{region=b1}
    	{region=b2}
    	Type:| [%@vSearchValue5_def%.40vSearchValue];
    	{endregion}
    	{lf};
    
    	{region=b3}
    	{comment = removed pipe after order label}
    	Order: (ProdOrder:Assembly No)		
    (ProdOrder:Line No)
    (ProdOrder:Msn);
    (ProdOrder:Plane Set)
    (ProdOrder:Reg)
    (ProdOrder:Variant No);
    	{endregion}
    {endregion}
    
    {condition=(vOpt="Group")}
    	{start_pos}
    	{region=c}
    	Group:| [%@vSearchValue4_def%.10vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Class")}
    	{start_pos}
    	{region=d}
    	Class:| [%@vSearchValue1_def%.40,5vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Usage")}
    	{start_pos}
    	{region=e}
    	Usage:| [%d;O={@@}%.32,22vSearchValue^$$a_Usage];
    	{endregion}  '<==== Watch no ;
    
    {comment = i left some space at left side for easy to read and build. after done, delete space, move to where you want to be}
    {comment = Dlg box will not be able to change for bigger or smaller box. will not shrink or expand by A5. }
    
    ;	'<=== watch ; at here, end of condition	{comment = end of Region}
    {condition=.t.};
    
    
    {endregion}; {comment = end frame}
    
    ; 
    {region};
    {lf}
    {endregion};
    {line=1,0};
    {region}
    {justify=center}
    <*OK!OK> <Cancel!CANCEL>
    {endregion};
    %dlg%)
    
    ''I am not sure, you can do this "{condition=(vOpt="Find by Fragment".and.FindOpt="Operator")}" or not, I know I can use " A .or. B "

  9. #9
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    791

    Default Re: what am I doing wrong with this {condition} in a dialog?

    Thanks John,

    nearly there

    Code:
    varC_result = ui_dlg_box("Listings",<<%dlg%
    {removecomments}
    {Background=#153+204+255}
    {region}
    (vOpt:Based List)|
    (vOpt:Class)|
    (vOpt:Code)|
    (vOpt:Date)|
    (vOpt:Find by Fragment)|
    (vOpt:Group);
    (vOpt:Location)|
    (vOpt:Operator Name)|
    (vOpt:Production List)|
    (vOpt:Reg)|
    (vOpt:Aircraft Type)|
    (vOpt:Usage);
    {line=6,0};
    {endregion};
    {region=a} 
    {start_pos}
    {condition=(vOpt="Find by Fragment")}
    {region=a1}
    	(FindOpt:Aircraft)
    	(FindOpt:Base)
    	(FindOpt:Operator);{endregion};
    	
    {condition=(vOpt="Find by Fragment".and.FindOpt="Aircraft")}
    	{start_pos}
    	{region=a11}
    Aircraft Type Fragment: [%@SearchValue6_def%.40vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Find by Fragment".and.FindOpt="Base")}
    	{start_pos}
    	{region=a11}
    	{region=a12}
    Base Name Fragment: [.40varC_fragment];	{endregion}
    	{endregion}
    
    {condition=(vOpt="Find by Fragment".and.FindOpt="Operator")}
    	{start_pos}
    	{region=a12}
    Operator Name Fragment: [.40varC_fragment]; 
    	{region=a13}
    Country: [%@varC_country_def%.25,varC_country] {endregion}
    	{endregion}
    
    {condition=(vOpt="Reg")}
    {start_pos}
    {region=a1}
    (vRegOpt:Multiple) 
    (vRegOpt:Old Id)
    (vRegOpt:Range)
    (vRegOpt:Single);
    {endregion};
    	
    {condition=(vOpt="Reg".and.vRegOpt="Multiple")}
    	{start_pos}
    	{region=a1}
    	{region=a12}
    Entries: [%mw%.12,15vSearchValue]; {endregion}
    	{endregion}
    
    {condition=(vOpt="Reg".and.vRegOpt="Range")}
    	{start_pos}
    	{region=a1}
    	{region=a12}
    Start:  [.12vSearchValueStart]
      End:  [.12vSearchValueEnd]; 
    {endregion}
    	{endregion}
    
    {condition=(vOpt="Reg".and.vRegOpt="Old Id")}
    	{start_pos}
    	{region=a1}
    	{region=a12}
    Old Id: [.12vSearchValue];
    {endregion}
    	{endregion}
    
    {condition=(vOpt="Reg".and.vRegOpt="Single")}
    	{start_pos}
    	{region=a1}
    		{region=a12}
    Single: [.12vSearchValue]; 
    		{endregion}
    	{endregion}
    
    {condition=(vOpt="Production List")}
    	{start_pos}
    	{region=b1}
    		{region=b2}
    (vPrdOrder:Assembly No)		
    (vPrdOrder:Line No)
    (vPrdOrder:Msn);
    (vPrdOrder:Plane Set)
    (vPrdOrder:Reg)
    (vPrdOrder:Variant No);
    		{endregion}
    	{lf};
    		{region=b3}
    Type:| [%@vSearchValue5_def%.40vSearchValue];
    	{endregion}
    {endregion}
    
    {condition=(vOpt="Group")}
    	{start_pos}
    	{region=a1}
    Group: [%@vSearchValue4_def%.10vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Code")}
    	{start_pos}
    	{region=a1}
    Code: [.10vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Operator Name")}
    	{start_pos}
    	{region=a1}
    Operator Name: [%@vSearchValue2_def%.40,10vSearchValue]
    	{endregion}
    
    {condition=(vOpt="Aircraft Type")}
    	{start_pos}
    	{region=a1}
    Aircraft Type: [%@vSearchValue3_def%.40,10vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Class")}
    	{start_pos}
    	{region=a1}
    Class: [%@vSearchValue1_def%.40,5vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Usage")}
    	{start_pos}
    	{region=a1}
    Usage: [%d;O={@@}%.32,22vSearchValue^$$a_Usage];
    	{endregion} 
    	
    {condition=(vOpt="Location")}
    	{start_pos}
    	{region=a1}	
    Location Logging: [%@vSearchValue7_def%.40vSearchValue];
    	{endregion}	
    {condition=(vOpt="Based List")}	 
    	{start_pos}
    	{region=a1}
    Base: [%@vSearchValue9_def%.40vSearchValue];
    User: [%M%.30,15vBaseUser^#a_vBaseUser];	
    	{endregion}
    {condition=.t.};
    {endregion}; 
    {region=b};
    {endregion};
    {line=1,0};
    {region}
    {justify=center}
    <*OK!OK> <Cancel!CANCEL>
    {endregion};
    %dlg%)
    all bar one start at the same wrong start position.
    Only one starts at the correct start position ("Find by Fragment").

    suggestions ?
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  10. #10
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: what am I doing wrong with this {condition} in a dialog?

    You are starting regions(cells) but not ending them.

    Find by Fragment is the first region and controls in the list. So it has nothing above it.

    change as such..

    Country: [%@varC_country_def%.25,varC_country] {endregion}
    {endregion}
    {endregion}
    {endregion}


    more changes after that to end each region after the controls are defined.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  11. #11
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Location
    Gloucestershire, UK
    Posts
    791

    Default Re: what am I doing wrong with this {condition} in a dialog?

    Thanks Guys!
    finally got it working :)

    Code:
    varC_result = ui_dlg_box("Listings",<<%dlg%
    {removecomments}
    {Background=#153+204+255}
    {region}
    (vOpt:Based List)|
    (vOpt:Class)|
    (vOpt:Code)|
    (vOpt:Date);
    (vOpt:Find by Fragment)|
    (vOpt:Group)|
    (vOpt:Location)|
    (vOpt:Operator Name);
    (vOpt:Production List)|
    (vOpt:Reg)|
    (vOpt:Aircraft Type)|
    (vOpt:Usage);
    {line=4,0};
    {endregion};
    {region=a} 
    {start_pos}
    {condition=(vOpt="Find by Fragment")}
    {region1}
    	(vFindOpt:Aircraft)
    	(vFindOpt:Base)
    	(vFindOpt:Operator);
    	{endregion};
    	
    {condition=(vOpt="Find by Fragment".and.vFindOpt="Aircraft")}
    	{start_pos}
    	{region=a11}
    Aircraft Type Fragment: [%@SearchValue6_def%.40vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Find by Fragment".and.vFindOpt="Base")}
    	{start_pos}
    	{region=a11}
    Base Name Fragment: [.40varC_fragment]
    	{endregion}
    
    {condition=(vOpt="Find by Fragment".and.vFindOpt="Operator")}
    	{start_pos}
    	{region=a11}
    Operator Name Fragment: [.40varC_fragment]; 
    Country: [%@varC_country_def%.25,varC_country] 
    	{endregion}
    {endregion1}
    
    {condition=(vOpt="Reg")}
    {start_pos}
    {region=a1}
    (vRegOpt:Multiple) 
    (vRegOpt:Old Id)
    (vRegOpt:Range)
    (vRegOpt:Single);
    
    {condition=(vOpt="Reg".and.vRegOpt="Multiple")}
    	{start_pos}
    	{region=a11}
    Entries: [%mw%.12,10vSearchValue]; 
    	{endregion}
    
    {condition=(vOpt="Reg".and.vRegOpt="Range")}
    	{start_pos}
    	{region=a11}
    Start:  [.12vSearchValueStart]
      End:  [.12vSearchValueEnd]; 
    	{endregion}
    
    {condition=(vOpt="Reg".and.vRegOpt="Old Id")}
    	{start_pos}
    	{region=a11}
    Old Id: [.12vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Reg".and.vRegOpt="Single")}
    	{start_pos}
    	{region=a11}
    Single: [.12vSearchValue]; 
    	{endregion}
    {endregion}	
    
    {condition=(vOpt="Production List")}
    	{start_pos}
    	{region=b1}
    		{region=b2}
    (vPrdOrder:Assembly No)		
    (vPrdOrder:Line No)
    (vPrdOrder:Msn);
    (vPrdOrder:Plane Set)
    (vPrdOrder:Reg)
    (vPrdOrder:Variant No);
    		{endregion};
    		{region=b3}
    Type: [%@vSearchValue5_def%.40vSearchValue];
    	{endregion}
    {endregion}
    
    {condition=(vOpt="Group")}
    	{start_pos}
    	{region=a1}
    Group: [%@vSearchValue4_def%.10vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Code")}
    	{start_pos}
    	{region=a1}
    Code: [.10vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Operator Name")}
    	{start_pos}
    	{region=a1}
    Operator Name: [%@vSearchValue2_def%.40,12vSearchValue]
    	{endregion}
    
    {condition=(vOpt="Aircraft Type")}
    	{start_pos}
    	{region=a1}
    Aircraft Type: [%@vSearchValue3_def%.40,12vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Class")}
    	{start_pos}
    	{region=a1}
    Class: [%@vSearchValue1_def%.40,6vSearchValue];
    	{endregion}
    
    {condition=(vOpt="Usage")}
    	{start_pos}
    	{region=a1}
    Usage: [%d;O={@@}%.32,12vSearchValue^$$a_Usage];
    	{endregion} 
    	
    {condition=(vOpt="Location")}
    	{start_pos}
    	{region=a1}	
    Location Logging: [%@vSearchValue7_def%.40vSearchValue];
    	{endregion}	
    {condition=(vOpt="Based List")}	 
    	{start_pos}
    	{region=a1}
    Base: [%@vSearchValue9_def%.40vSearchValue];
    User: [%M%.30,10vBaseUser^#a_vBaseUser];	
    	{endregion}
    {condition=.t.};
    {endregion}; 
    {region=b};
    {endregion};
    {line=1,0};
    {region}
    {justify=center}
    <*OK!OK> <Cancel!CANCEL>
    {endregion};
    %dlg%)
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

Similar Threads

  1. Saving Data to the Wrong Record after {dialog.object}.refreshListData();
    By Pizzadude in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 10-31-2017, 06:56 AM
  2. What am I doing wrong with dialog
    By Keith Hubert in forum Alpha Five Version 10 - Desktop Applications
    Replies: 4
    Last Post: 08-06-2012, 10:57 AM
  3. Filtering Dialog DropDown (What am I doing wrong?)
    By Rich Hartnett in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 05-15-2011, 05:26 PM
  4. What do I have wrong in my dialog box script?
    By joannristau in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 03-06-2009, 06:42 PM
  5. Wrong icon in dialog (modal) form
    By Bonbon in forum Alpha Five Version 9 - Desktop Applications
    Replies: 0
    Last Post: 07-28-2008, 12:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •