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

Array Question -will a multi-dimension array solve my problem?

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

    Array Question -will a multi-dimension array solve my problem?

    Hello!

    I am including a sample database to show and describe my problem. I beleive what I need to use is a multi-dimension array in order for me to update fields in a table. I need to use an xdialog and NOT a browse on a form. With the sample database I included a form will open. The button on the left... called "run script" will run the xdialog in question -"Array_Example". My problem is described in that xdialog. Thanks for any help!

    Don

    Complex_Array.zip

    #2
    Re: Array Question -will a multi-dimension array solve my problem?

    very complex request to process. Why do you need to keep the save process to the end? It may be simpler to have a save message based on the user click event based on field changes.
    -----------------------------------------------
    Regards
    Mark Pearson
    [email protected]
    Youtube channel
    Website

    Comment


      #3
      Re: Array Question -will a multi-dimension array solve my problem?

      save has to happen at the end because it's an all or none procedure... if the user cancels then no changes can be made to the entire process.

      Comment


        #4
        Re: Array Question -will a multi-dimension array solve my problem?

        Hi Don,

        I know this does not answer your question, but I looked at your use of arrays and thought I could supply an alternative to them for you to look at. cut and apste the below script. It should create an xdialog with two of your lists. To me it has a simpler look and feel.



        dim Patron as c
        dim myid as c
        dim charges3 as c = ""
        patron = TABLE.EXTERNAL_RECORD_CONTENT_GET("patrons","'{Data='+ alltrim(patron_id) + '}' + alltrim(patron_ID) + '|' + alltrim(Pa_Fu_Na) + '|' + alltrim(Pa_Addr_1) + '|' + alltrim(Pa_City) + '|' +alltrim(Pa_State) + '|' + alltrim(Pa_Zip) + '|'+ alltrim(Pa_H_Ph)")

        ui_dlg_box("Patrons",<<%dlg%
        {on_activate=init}
        {region}{font=arial,10}
        [%K%.134,15id1^"#:6|Patron_ID:14|Name:21|Addr:30|City:22|State:8|Zip:10|Phone:20"Patron!change_*];

        [%K%.66,18id2^"#:6|Patron_ID:14|Charge_ID3:0|Charge:15|Item:30|Details:30|Interest:12|Tax:12"Charges3];
        {endregion};
        %dlg%,<<%code%

        if left(a_dlg_button,7) = "change_" then
        myid = id1
        if a_dlg_button = "change_click" then

        charges3 = table.external_record_content_get("charges","'{Data='+ alltrim(Patron_Id) + '}' + alltrim(patron_ID) + '|' + Charge_Id + '|' + Charge + '|' + Item + '|' + Other_Details + '|' + Interest + '|' + Tax","","Patron_Id=var->myid")
        ui_dlg_commit("Patrons")
        elseif a_dlg_button = "change_setfocus" then

        charges3 = table.external_record_content_get("charges","'{Data='+ alltrim(Patron_Id) + '}' + alltrim(patron_ID) + '|' + Charge_Id + '|' + Charge + '|' + Item + '|' + Other_Details + '|' + Interest + '|' + Tax","","Patron_Id=var->myid")
        ui_dlg_commit("Patrons")
        end if

        a_dlg_button = ""
        end if




        %code%)
        -----------------------------------------------
        Regards
        Mark Pearson
        [email protected]
        Youtube channel
        Website

        Comment


          #5
          Re: Array Question -will a multi-dimension array solve my problem?

          My appologies - the last example did not factor in the serial numbering. This one does

          dim Patron as c
          dim myid as c
          dim charges3 as c = ""
          patron = TABLE.EXTERNAL_RECORD_CONTENT_GET("patrons","'{Data='+ alltrim(patron_id) + '}' + alltrim(patron_ID) + '|' + alltrim(Pa_Fu_Na) + '|' + alltrim(Pa_Addr_1) + '|' + alltrim(Pa_City) + '|' +alltrim(Pa_State) + '|' + alltrim(Pa_Zip) + '|'+ alltrim(Pa_H_Ph)")

          patron = *for_each(x,left(x.value,at2("}",x.value,1)) + *counter() + "|" + right(x.value,len(x.value)-at2("}",x.value,1)),patron)
          ui_dlg_box("Patrons",<<%dlg%
          {on_activate=init}
          {region}{font=arial,10}
          [%K%.134,15id1^"#:6|Patron_ID:14|Name:21|Addr:30|City:22|State:8|Zip:10|Phone:20"Patron!change_*];

          [%K%.66,18id2^"#:6|Patron_ID:14|Charge_ID3:10|Charge:15|Item:30|Details:30|Interest:12|Tax:12"Charges3];
          {endregion};
          %dlg%,<<%code%

          if left(a_dlg_button,7) = "change_" then
          myid = id1
          if a_dlg_button = "change_click" then

          charges3 = table.external_record_content_get("charges","'{Data='+ alltrim(Patron_Id) + '}' + alltrim(patron_ID) + '|' + alltrim(Charge_Id) + '|' + transform(Charge,'$$$$.99') + '|' + Item + '|' + Other_Details + '|' + Interest + '|' + Tax","","Patron_Id=var->myid")
          charges3 = *for_each(x,left(x.value,at2("}",x.value,1)) + *counter() + "|" + right(x.value,len(x.value)-at2("}",x.value,1)),charges3)

          ui_dlg_commit("Patrons")
          elseif a_dlg_button = "change_setfocus" then

          charges3 = table.external_record_content_get("charges","'{Data='+ alltrim(Patron_Id) + '}' + alltrim(patron_ID) + '|' + Charge_Id + '|' + Charge + '|' + Item + '|' + Other_Details + '|' + Interest + '|' + Tax","","Patron_Id=var->myid")
          charges3 = *for_each(x,left(x.value,at2("}",x.value,1)) + *counter() + "|" + right(x.value,len(x.value)-at2("}",x.value,1)),charges3)

          ui_dlg_commit("Patrons")
          end if

          a_dlg_button = ""
          end if




          %code%)
          -----------------------------------------------
          Regards
          Mark Pearson
          [email protected]
          Youtube channel
          Website

          Comment


            #6
            Re: Array Question -will a multi-dimension array solve my problem?

            Hi Mark!
            Thanks for giving me another example of my problem. I always like seeing different ways of accomplishing the same thing. I will study it and hope it can give me new ideas. Have a great day!

            Don

            Comment


              #7
              Re: Array Question -will a multi-dimension array solve my problem?

              .bump

              Comment


                #8
                Re: Array Question -will a multi-dimension array solve my problem?

                Can I ask what other and other2 relate to. Still not sure I fully understand, but what about a notional save to a list from a button. Instead of your field boxes on the right hand side, have a button/s. When clicked it brings up xdialog with the detail you had in the field boxes. Do your thing, then close to return to the screen. When it closes it adds data to a global list that when the OK button is clicked, it loops through the list and does the changes you wanted.

                Hope this makes sense
                -----------------------------------------------
                Regards
                Mark Pearson
                [email protected]
                Youtube channel
                Website

                Comment


                  #9
                  Re: Array Question -will a multi-dimension array solve my problem?

                  In relation to my last, I would also consider that when the OK button is pressed it opens a xdialog with a list based on the changes only. This would have an accept button. There would be the opprounty to remove rows, return to main view and fix
                  -----------------------------------------------
                  Regards
                  Mark Pearson
                  [email protected]
                  Youtube channel
                  Website

                  Comment


                    #10
                    Re: Array Question -will a multi-dimension array solve my problem?

                    Hi Mark,
                    The example I provided is a generic app that I threw together to try and figure out my problem... which is an EMR/EHR program and the problem I am trying to solve is how to make a bulk payment by an insurance company.

                    ie. Blue Cross sends a bulk payment and now I need to apply those payments accross many different patients (and the many services performed on those patients) that only have blue cross. So in my example, the "patron" is actually the patient (or patients that have blue cross) and the charges and item numbers would be equivalent to the services etc. that have been performed on those patients. "Other" and "Other2" are blank because those would be the fields that I would enter the amount of the payment.

                    What I need to accomplish is to bring up the services for a single patient so I can apply a payment to those services. Then I need to bring up the next patient on the EOB (bulk payment) and apply the payments to those services.... the trouble I have is that when I navigate to a different patient the array initializes and blanks out the payments I just made to previous patient.

                    I can't save each time because it's a bulk payment that needs to be entered all at once.

                    I think I should be able to use an append_array function to add to the existing array (instead of overwriting each time I navigate to a different patient), but I haven't figured out how to NOT append if those items were already in the array (ie. if I go back to a previous item/service).

                    I think I'm getting closer and closer, but it's taken a while so far and I don't yet see the light at the end of the tunnel.

                    Don
                    Last edited by djldc; 08-08-2011, 02:02 PM. Reason: sp

                    Comment


                      #11
                      Re: Array Question -will a multi-dimension array solve my problem?

                      I beleived I figured out a solution:

                      using <ARRAY>.FIND()

                      I will post the example later tonight after I get home and spend some time on it.

                      Don

                      Comment


                        #12
                        Re: Array Question -will a multi-dimension array solve my problem?

                        yup... that did the trick.
                        Complex_Array_final.zip

                        Comment

                        Working...
                        X