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

Page Redirection

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

    Page Redirection

    I have this code in my AfterInsertRecord of my grid component

    Code:
     session.__protected__total_due=e.datasubmitted.total_due
    total_due is a label field. In my onpageredirect I have the following code

    Code:
    e.url= "https://www3.cenpos.net/webpay/html5/?merchantid="+"&amount="+session.__protected__total_due

    The page doesn't get populated. However when I change total_due to a text field the page variable gets populated with the value in the total_due field

    What could be the reason for this?

    #2
    Re: Page Redirection

    Sorry i forgot to add, I get this message

    Error executing afterInsertRecord event handler: command: session.__protected__total_due=e.datasubmitted.total_due Property not found
    e.datasubmitted.total_due subelement not found.

    Comment


      #3
      Re: Page Redirection

      I cannot test right now but believe a Label does not carry in the e property. Can you convert to a hidden field type? Hidden, Text, etc. field types do come over in e.
      Steve Wood
      See my profile on IADN

      Comment


        #4
        Re: Page Redirection

        I tested it as a hidden field as well but it is not possible for me to make it hidden since I would want the user to see the value in this field.
        I believe I read somewhere that I have define a primary of which I did in the Query part of the Grid. I also have in the afterinsertrecord
        e.primaryKeyValue=invoice_number.

        All I am trying to accomplish is to navigate to an external page and populating it using page variables from within the grid component. At first I created my own custom button and created an on click javascript event to open a new page and just added the variables which was pretty straight forward. However I am not sure how to do validation checks when the user clicks the custom button before navigating to the external page. Thus I decided to use the built in submit button since it would be easier for me to do my validation checks. However I am stuck since I can't pass this page variable if the field is a label.

        Any solution would be appreciated.


        Thanks

        Comment


          #5
          Re: Page Redirection

          First, e.primaryKeyValue already contains the primary key value, you don't set it to anything. Next, your choices (that I know of) are to set your Total_due as Hidden and use Query to create a dummy copy just for display, or write some xbasic in your event to go get the total_due value from the database using that primary key.
          Steve Wood
          See my profile on IADN

          Comment


            #6
            Re: Page Redirection

            Thanks for replying Steve.

            How do I go about creating a dummy copy of the Total_due?
            And would this dummy copy be a text or label?
            I did set the Total_due as a hidden field but when I do the issue with this is that the url doesn't get populated with the page variable.


            Also write some xbasic in your event to go get the total_due value from the database?
            My concern is that the user should be able to see the Total_due and not edit it and to pass this same total due to a page as a variable once the submit button is clicked.

            Comment


              #7
              Re: Page Redirection

              I can't get back to this for about 12 hours so hopefully someone else can chime in.
              Steve Wood
              See my profile on IADN

              Comment


                #8
                Re: Page Redirection

                the field total due, is that a calculated field and you are keeping that as a label. so no one will interfere?
                if the answer is Yes then you do the calculation in the afterInsert function and assign the result to the session variable.
                Code:
                        dim d1 as n
                	dim d2 as n
                	dim total as n
                	d1 = e.dataSubmitted.d1
                	d2 = e.dataSubmitted.d2
                	total = d1 * d2
                session.__protected__total_due = e.datasubmitted.total
                d1 and d2 are the precursor of the total
                edit: I see you are keeping as a label for that reason.
                Last edited by GGandhi; 06-16-2015, 08:56 PM.
                thanks for reading

                gandhi

                version 11 3381 - 4096
                mysql backend
                http://www.alphawebprogramming.blogspot.com
                [email protected]
                Skype:[email protected]
                1 914 924 5171

                Comment


                  #9
                  Re: Page Redirection

                  duplicate
                  deleted by me
                  thanks for reading

                  gandhi

                  version 11 3381 - 4096
                  mysql backend
                  http://www.alphawebprogramming.blogspot.com
                  [email protected]
                  Skype:[email protected]
                  1 914 924 5171

                  Comment


                    #10
                    Re: Page Redirection

                    Thanks for the replies.

                    I saw this thread on the message board http://www.alphasoftware.com/alphafo...ted+field+grid

                    Would it be possible to do something like this for version 10?
                    That is to make a textbox field read only.

                    Comment


                      #11
                      Re: Page Redirection

                      I set the property "Enable Expression" for the control to false and this disabled the textbox for editing. Now I am able to pass the variable to the page.

                      Another concern I have though is that my calculated fields only change when I click outside of a textbox field. Is there a way to update the calculated field whenever the user types in a value in another field?

                      For instance some fields on my grid are:
                      ss_amount------------ textbox
                      lv_amount------------ textbox
                      pe_amount------------textbox

                      total_amount--------- label

                      I want the total_amount to change whenever the user enters a value in any of the field even before leaving that field.

                      How can I accomplish this?

                      Comment


                        #12
                        Re: Page Redirection

                        Keep your total field as a client-side calculated field but add this to each of the other three controls in the onKeyUp event:

                        {dialog.Object}.refreshClientSideComputations();

                        Note that this does not save the record to the database. You have to Submit or add additional javascript to your event(s) to cause it to auto-submit.

                        BTW, this is specifically because you said you wanted the total to change "before leaving the field."
                        Steve Wood
                        See my profile on IADN

                        Comment


                          #13
                          Re: Page Redirection

                          Thanks,

                          That is fine since the submit button will save the records then navigate to another page.
                          I just want the user to see the updated calculations.

                          What I would like though is for the submit button to be enabled once the grid initializes.
                          How can I accomplish this?

                          Comment


                            #14
                            Re: Page Redirection

                            Ok I got it to work with the help from a post on the messageboard

                            I placed a hidden field on my grid called Makedirty then I added the following code into the javascript system events on Gridrender
                            Code:
                            setTimeout("{grid.Object}.setValue('G','MAKEDIRTY',1,'five')",1200);

                            Comment


                              #15
                              Re: Page Redirection

                              Steve

                              What you gave me for the onkeyup was for a dialog.

                              I used the following code for the grid {grid.Object}.refreshRow({Grid.RowNumber});

                              but I received the message below

                              onkeyup.PNG

                              Comment

                              Working...
                              X