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

Stumped - Dynamic Edit-Combo Field and Load Data

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

    Stumped - Dynamic Edit-Combo Field and Load Data

    So this issue has been a plague for some months and I have yet to figure out a solid solution..

    I have a text field (Badge ID) that has lookup enabled. The lookup type is Edit-Combo List. In my lookup definition I have it set to Dynamic to where it looks up all 'Active Badge Numbers' from the Employee Table in SQL. Once the badge number is found, it's set to fill in some other important information about the employee in the other text fields (Employee ID, First Name, Last Name, Designation and Credit Balance). This is illustrated below.

    1.jpg

    Now, one of the requirements of this application is that I had to use RFID scanning to validate employees against the database. With that being said, I have set initial focus to the text field (Badge ID) when the component loads and I am able to scan RFID badges accordingly and all of the related employee information gets filled in to the other fields based on the badge number. This is illustrated below.

    2.jpg

    My issue is - each employee has a running credit balance. When the badge is scanned and items are issued to the employee, an amount is deducted from their credit balance. The deduction itself works and reflects correctly in the database. However, say I scan the employee's badge, the employee has a balance of $60 and I issue an item to that employee valued at $20. Submit it to the database. Now, if I scan that same employee's badge again after issuing that $20 item, the credit balance should show $40.. However, it does not! It shows $60. BUT if I refresh the entire application, scan that employee's badge, it will show $40... I need the balance to update in real-time. I'm assuming their has to be some sort of callback to accomplish this?

    I've tried a number of things including changing the 'Load Data Method' for the Badge ID field to Ajax Callback. Doing this did not help as when the badge is scanned into the text field, I guess the callback is not fast enough or something? It does not function the way I'm needing it to function.

    The clerk should be able to just scan badge, the relevant information is filled in, items get issued and submits. That's the flow.

    Any help would be greatly appreciated!

    P.S. This is exactly what occurs when I change the 'Load Data Method' to AJAX Callback instead of AtRender Time:

    3.jpg

    Notice that it no longer fills in all of the other relevant data, including the balance.
    Last edited by txsiccness; 08-27-2015, 09:41 AM.

    #2
    Re: Stumped - Dynamic Edit-Combo Field and Load Data

    It sounds like while you might be updating the database, you're not refreshing the record you're on in the webpage. Thinking along those lines, can't you either update the column in the UX or update the row if it's in a grid?

    Comment


      #3
      Re: Stumped - Dynamic Edit-Combo Field and Load Data

      This is a UX component.. and it's a text field that is filled based on another text field value, in this case the 'Badge ID' that is scanned.

      I know where the issue lies, I'm just not sure on how I am able to go about making sure that the field (credit balance) is refreshed every time a badge is scanned. I have to refresh the entire component in order to get the new balance for employees after issuing items and deducting those values from credit balance.. There's no callback happening here and that's what I am in need of. I've tried using the Ajax callback setting for Loading Data and it doesn't work as expected.

      Comment


        #4
        Re: Stumped - Dynamic Edit-Combo Field and Load Data

        we can see the ux/dialog. where is the credit or debit issued on a separate ux/grid?
        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


          #5
          Re: Stumped - Dynamic Edit-Combo Field and Load Data

          change that to onChange event for that field and see if it works the way you want.
          if still has problem post back someone will try to figure it out for you.
          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


            #6
            Re: Stumped - Dynamic Edit-Combo Field and Load Data

            Govindan,

            4.jpg

            The items are issued on the same UX component. This UX is bound to a P.O. Header (Employee Information) and P.O. Detail Table (Issue Items - Repeating Section).

            I'm not too sure what you are suggesting I change to an onChange event - I'm using a lookup for the Badge No that auto-fills other related fields. If it makes a difference, I did try the "Lookup and fill-in fields' in Action JavaScript on the Badge No field's onChange. This produced an 'Error 1 while computing lookup' error.

            Regards,
            Last edited by txsiccness; 08-28-2015, 09:18 AM.

            Comment


              #7
              Re: Stumped - Dynamic Edit-Combo Field and Load Data

              after you submit the record, you have set the dialog/ux to enter a new record and when you scan the badge id the ux is not updating, right?
              or
              after you submit you stay on the record and wants to see the total change, is that the way you want?
              or better yet if you can take a screencast and show the events leading up to where you want the change then it will help a bit more.
              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


                #8
                Re: Stumped - Dynamic Edit-Combo Field and Load Data

                Ok.

                When I scan the RFID badge, the number is inputted into 'Scan Badge'. Once this happens, the 'Employee ID', 'First Name', 'Last Name', 'Job' and 'Company' are automatically filled in based on the Badge Number via a Lookup that is set on the 'Scan Badge' field.

                Under issue items, you can select the Equipment that you would like to issue. Each equipment item has a price value that is deducted from the employee's credit balance once it has been issued (or submitted rather). Since the issue items is a repeating section, all items are totaled before submission to ensure the correct amount is deducted from their credit balance.

                This entire flow works great. But.... (refer to the illustrations)

                5.jpg I've scanned the badge here, selected 2 items to issue and click submit. Notice my balance is -$100.63.
                6.jpg After submit the UX is reset. I scan my badge again (without refreshing the page). Notice my balance is still -$100.63.
                7.jpg I refresh the page in the browser. Notice my balance is now -$112.12. This is correct based on the starting balance -$100.63 minus the 2 items valued at $11.49 that I issued to myself.

                What I need is when I issue items, submit to database (updating the credit balance), then rescan my badge, I should see the updated balance without refreshing the page..

                Hope this helps. Thanks for your support!

                P.S. "after you submit the record, you have set the dialog/ux to enter a new record and when you scan the badge id the ux is not updating, right?" - Yes this is right.
                Last edited by txsiccness; 08-28-2015, 09:55 AM.

                Comment


                  #9
                  Re: Stumped - Dynamic Edit-Combo Field and Load Data

                  .jpg After submit the UX is reset. I scan my badge again (without refreshing the page). Notice my balance is still -$100.63.
                  may be stupid question but I ask anyway.
                  you have header table, repeating section for the detail of the credit.
                  the customer is the THIRD table used for lookup.
                  when the dialog is submitted it updates the header and the detail tables does that update the customer table where the look up is drawing the data from?
                  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: Stumped - Dynamic Edit-Combo Field and Load Data

                    http://screencast.com/t/kl4H4CWjVc
                    take a look this is how I would do.
                    see if you can implement in your dialog/ux. if you need more help I will retain this dialog for about a week then delete it. ask me before then.
                    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


                      #11
                      Re: Stumped - Dynamic Edit-Combo Field and Load Data

                      Govindan,

                      The only information that goes into P.O Header is Employee Information and the total of the P.O.
                      The items being issued are going into P.O. Details.. This is a one to many relationship in SQL that the UX component is bound to.

                      The employee balances are not housed inside of the P.O. Header table nor the P.O. Details table.

                      When items are issued to an employee, there is a trigger in my database that takes the P.O. Total (from the P.O. Header table) and deducts that quantity from the employee's balance (separate table) which is related to the Employees table. The reason this is set up this way is because these credit balances vary depending on your job designation. However, the issue is not that the deduction isn't happening, the issue is that when I scan the badge after issuing items to a given employee, it does not reflect the right credit balance UNLESS i refresh the entire page after issuing. The deduction is happening on the database end. Everything is working as it should except for the callback that "refreshes" the employee's credit.

                      I need Alpha to say "Hey SQL, give me the updated credit balance after I scan this badge".

                      Comment


                        #12
                        Re: Stumped - Dynamic Edit-Combo Field and Load Data

                        I need Alpha to say "Hey SQL, give me the updated credit balance after I scan this badge".

                        uncheck the cached data in the ajax callback, then every time the drop down comes a new call back done.
                        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


                          #13
                          Re: Stumped - Dynamic Edit-Combo Field and Load Data

                          I need Alpha to say "Hey SQL, give me the updated credit balance after I scan this badge".
                          load method ajaxcallback(you have at render time change that)
                          then
                          uncheck the cached data in the ajax callback, then every time the drop down comes a new call back done.
                          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


                            #14
                            Re: Stumped - Dynamic Edit-Combo Field and Load Data

                            Govindan,

                            In my previous posts, I stated that I've already tried that. Just to confirm here are my results.

                            8.jpg Notice AJAX callback is selected, Allow cache is unchecked.

                            9.jpg The result. Doesn't fill in fields.

                            Comment


                              #15
                              Re: Stumped - Dynamic Edit-Combo Field and Load Data

                              http://screencast.com/t/dOgajJpi6

                              Here is a screencast of what happens when I turn AJAX callback on and allow cache is unchecked.

                              Comment

                              Working...
                              X