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

Variable from xdialog

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

    Variable from xdialog

    Hi

    I have got a cascading list xdialog box that is working great except that I cannot see the result of my selection in the variable.

    What could I be doing wrong or do I have the wrong expectation?

    xdialog.JPG

    then i use that variable to extract the contents of a field into another variable.

    key.JPG

    and use that variable to set the contents of a field

    This is the error i get

    error.JPG

    If this is not enough information please indicate what you would like.
    Why did I ever say yes?

    #2
    Re: Variable from xdialog

    I don't have a lot of experience with cascading lists. However, if it were me I'd verify that the variable "selected" contains the text you are expecting. If the value you need is present in the variable, I'd then double check the external table. Is the "selected" field value actually present in a record there?

    Comment


      #3
      Re: Variable from xdialog

      The variable represented by the cascading list has levels corresponding to the cascade level. Fo a two tier list

      selected.level1 will contain the choice made at that level and selected.level2 will contain the final choice.
      There can be only one.

      Comment


        #4
        Re: Variable from xdialog

        Malcolm,

        Your variable - "show" in the main dialog Box will not show you the return value. You need one more script which will show the result after a main action script genie.

        attached the detail.
        ActionScript 1.jpgActionScript 2.jpg


        The " Showvar() " function will show the result, like a msgbox() but will not transfer other code. If it show the result then you know there is an active variable( ItemKey_item_Key) as you designed.

        Comment


          #5
          Re: Variable from xdialog

          Stan, thanks for that. I didn't see this in the helps.

          -- tom

          Comment


            #6
            Re: Variable from xdialog

            I didn't either. I just created a simple cascading list xdialog from an action script and looked at the xbasic. The two list boxes in the dialog, hilighted in red below, represent the two pointer "sub" variables created by the action script genie.

            Code:
            'Create an XDialog dialog box to prompt for parameters.
            DIM SHARED Selected as C
            DIM SHARED varC_result as C
            DIM Selected as P
            DIM Selected.level[2] as P
            DIM Selected.level[1].type as C = "DBF"
            DIM Selected.level[1].nullEntry as C
            DIM Selected.level[1].DBFTable as C = "bordgde"
            DIM Selected.level[1].DBFExpr as C = "alltrim(cmark)"
            DIM Selected.level[1].DBFFilter as C
            DIM Selected.level[1].DBFOrder as C = "alltrim(cmark)"
            DIM Selected.level[1].SQLConnection as C
            DIM Selected.level[1].SQLStatement as C
            DIM Selected.level[2].type as C = "DBF"
            DIM Selected.level[2].nullEntry as C
            DIM Selected.level[2].DBFTable as C = "bordgde"
            DIM Selected.level[2].DBFExpr as C = "alltrim(fscdesc)"
            DIM Selected.level[2].DBFFilter as C = "alltrim(cmark)=:level1"
            DIM Selected.level[2].DBFOrder as C = "alltrim(fscdesc)"
            DIM Selected.level[2].SQLConnection as C
            DIM Selected.level[2].SQLStatement as C
            DIM Selected.level1 as c = ""
            DIM Selected.level1List as c = ""
            DIM Selected.level2 as c = ""
            DIM Selected.level2List as c = ""
            Selected.level1List = a5_xd_getQueryComboBox("",Selected)
            ok_button_label = "&OK"
            cancel_button_label = "&Cancel"
            varC_result = ui_dlg_box("Alpha Five",<<%dlg%
            {region}
            Type prompt here:| {region}
            {encoding=utf8}[.40[COLOR="#FF0000"]Selected.level1[/COLOR]^=Selected.level1List!Selected.level1?Selected.level1List<>""];
            {encoding=utf8}[.40[COLOR="#FF0000"]Selected.level2[/COLOR]^=Selected.level2List!Selected.level2?Selected.level2List<>""];
            {endregion};
            {endregion};
            {line=1,0};
            {region}
            <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
            {endregion};
            %dlg%,<<%code%
            if a_dlg_button = "Selected.level1" then
            	a_dlg_button = ""
            	if Selected.level1 <> "" then
            		Selected.level2List = a5_xd_getQueryComboBox(Selected.level1,Selected)
            		Selected.level2 = ""
            	else
            		Selected.level2List = ""
            		Selected.level2 = ""
            	end if
            end if
            if a_dlg_button = "Selected.level2" then
            	a_dlg_button = ""
            	if Selected.level2 <> "" then
            	else
            	end if
            end if
            %code%)
            There can be only one.

            Comment


              #7
              Re: Variable from xdialog

              Good work, Stan!

              Now, how about working up some new "text" that could be suggested to Alpha as a supplement to the existing help file discussion?

              -- tom

              Comment


                #8
                Re: Variable from xdialog

                Thanks guys

                your information as usual top notch.

                So I now have the correct returned variable from my cascading list.

                last nights thought was both that it had something to with the level and to look at the xbasic of the action script.

                retrospective awareness is always correct. haha

                now I just need it to get me the right information out of the table.

                will post some clearer information after todays attempts if still not successful.
                Much thanks

                Malcolm
                Why did I ever say yes?

                Comment


                  #9
                  Re: Variable from xdialog

                  I have my cascading list working well now and the selection process works.

                  there seem to be an interesting problem occur though. After several uses of the cascading list what happens is that error turns up in the second option and if i try and do thing like open an interactive window i get this error message

                  Maximum session open tables exceeded
                  It seems that the tables get opened but not closed again.

                  I will keep looking for a solution
                  but in the meantime any suggestions and what information would any one like to assist them?
                  Why did I ever say yes?

                  Comment

                  Working...
                  X