Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 04:52 PM. Reason: Correct error
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

  • #2
    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.
    "Make it as simple as possible, but not simpler."
    Albert Einstein

    Comment


    • #3
      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

      Comment


      • #4
        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};

        Comment


        • #5
          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.

          Comment


          • #6
            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

            Comment


            • #7
              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

              Comment


              • #8
                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 "

                Comment


                • #9
                  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

                  Comment


                  • #10
                    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.
                    "Make it as simple as possible, but not simpler."
                    Albert Einstein

                    Comment


                    • #11
                      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

                      Comment

                      Working...
                      X