Alpha Video Training
Results 1 to 13 of 13

Thread: Repeating Section dropdowns after 'Refresh Controls' call

  1. #1
    "Certified" Alphaholic
    Real Name
    Scott
    Join Date
    Mar 2010
    Location
    Toronto,ON
    Posts
    1,031

    Default Repeating Section dropdowns after 'Refresh Controls' call

    I have repeating sections that link users to a visit. I have a link that says 'Add New User'. When clicking this link a popup comes up and I add new users.

    I use the following code to refresh the dropdown in the repeating section:
    {dialog.Object}.refreshDropdownBoxChoices('DDUSER');

    This works fine, however, when clicking Add New Row in the repeating section - the dropdowns do not have my new user.
    Is there a way to tell Alpha that when refreshing the control it should store this list as the new list when Adding New rows?

    Any help is appreciated
    Scott Moniz - Computer Programmer/Analyst
    REA Inc.
    http://reainc.net
    (416)-533-3777
    scott@reainc.net

    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
    contact us to discuss options.

  2. #2
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    I do not where you are using that code, however would you mind testing the same
    {dialog.Object}.refreshDropdownBoxChoices('DDUSER');
    in the dduser control onFocus event and see if it works.

    secondly, is this a desktop question? it is in desktop section.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  3. #3
    "Certified" Alphaholic
    Real Name
    Scott
    Join Date
    Mar 2010
    Location
    Toronto,ON
    Posts
    1,031

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    Hi Ggandhi,
    It is technically a web quesiton, I must have put it in the wrong section.

    Using on focus might be a good bandaid fix but will introduce a number of redudant ajax callbacks. I suppose with the caching it may not be so bad and it is better than it not working.
    I was using the refreshDropdownBoxChoices call on the OnHide event of the dialog window that actually adds users.
    So when the popup window is closed - the choices get refreshed. This works for existing dropdowns but when I add new records, it uses a cached list.

    Thanks for your input
    Scott Moniz - Computer Programmer/Analyst
    REA Inc.
    http://reainc.net
    (416)-533-3777
    scott@reainc.net

    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
    contact us to discuss options.

  4. #4
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    I had similar situation where I had one button to add the name to list another to refresh the dropdown, now you made me think
    and now I am testing new method, so far so good.
    when you click on the link to add the new user you are using the dialog right? when you save the dialog on the afterDialogValidate event the variable that is exposed can be used to refresh the list.

    here is the code I used and seems to work.

    Code:
    if rtc.flagRecordWasSaved = .t. then
    	
    	e.javascript = e.javascript+ crlf()+"var po = {dialog.object}.getParentObject();"
    	e.javascript = e.javascript + "if (po) {po.refreshDropdownBoxChoices('NAME');}"
    
    end if
    edit: added if (po)
    in your case change to DDUSER
    Last edited by GGandhi; 11-19-2014 at 07:54 PM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  5. #5
    "Certified" Alphaholic
    Real Name
    Scott
    Join Date
    Mar 2010
    Location
    Toronto,ON
    Posts
    1,031

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    Hi Ggandhi,
    I have similar code, but does the following work with your example:

    Click the Add New User button
    Add a User
    Names refresh - Okay
    What happens if you click the 'Add New Row' in the repeat section? Does the NEW dropdown contain your new entry?

    Would appreciate it if you let me know

    Thanks very much for your time
    Scott Moniz - Computer Programmer/Analyst
    REA Inc.
    http://reainc.net
    (416)-533-3777
    scott@reainc.net

    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
    contact us to discuss options.

  6. #6
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    http://screencast.com/t/kvtgq7Z1ZCJ

    http://screencast.com/t/lFdbAdVgO

    this is two part series, one showing in real life I did not add data not to mess up my database,
    the second one mock up shows what is happening.
    hope this is what you are looking for..
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  7. #7
    "Certified" Alphaholic
    Real Name
    Scott
    Join Date
    Mar 2010
    Location
    Toronto,ON
    Posts
    1,031

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    Hi Ggandhi,
    Thank you for making the screencasts.
    I took a look at them but here is the issue I have:

    1) Click the Add Vendor
    2) Add 'peacock'
    3) Peacock will show in any dropdowns
    4) Add New Row to the repeating section
    5) Without doing anything else, see if 'peacock' exists in the New Row

    In our tests over here, the newly added row does not contain the refreshed list.
    Can you see if this bug happens in your version as well?

    Someone had suggested I move the refresh code to onFocus of the dropdown, but this might introduce a lot of redundant ajax calls.
    Just trying to see if there is a better solution.

    Thank you for your time / patience / assistance
    Scott Moniz - Computer Programmer/Analyst
    REA Inc.
    http://reainc.net
    (416)-533-3777
    scott@reainc.net

    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
    contact us to discuss options.

  8. #8
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    did i not show with mozart? the next one?
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  9. #9
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    i just added new row and all of the newly added items exist
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  10. #10
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  11. #11
    "Certified" Alphaholic
    Real Name
    Scott
    Join Date
    Mar 2010
    Location
    Toronto,ON
    Posts
    1,031

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    Hi GGandhi your last example is correct (the one with belafonte) - and everything seems to work in your system.
    What Alpha Version are you using (V11? V12?) and Build#?
    Maybe this is specific to Alpha Version V12.2 Build 1826.

    Thank you for taking time out of your day.
    Scott Moniz - Computer Programmer/Analyst
    REA Inc.
    http://reainc.net
    (416)-533-3777
    scott@reainc.net

    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
    contact us to discuss options.

  12. #12
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    look down to my signature
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  13. #13
    "Certified" Alphaholic
    Real Name
    Scott
    Join Date
    Mar 2010
    Location
    Toronto,ON
    Posts
    1,031

    Default Re: Repeating Section dropdowns after 'Refresh Controls' call

    Gotcha - Wasn't sure if that was the only version you used.
    Maybe this is something related to the specific version Im using.

    Thank you for all your help.
    Scott Moniz - Computer Programmer/Analyst
    REA Inc.
    http://reainc.net
    (416)-533-3777
    scott@reainc.net

    REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
    If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
    contact us to discuss options.

Similar Threads

  1. Set Repeating Section Row Count During an Ajax Call Back
    By istuart in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 01-15-2014, 11:38 AM
  2. Replies: 1
    Last Post: 10-25-2013, 11:06 AM
  3. How to get dialog repeating section row count to populate controls inside.
    By -Jinx- in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 12-13-2012, 04:45 PM
  4. how to refresh repeating section of a dialog ?
    By Ken Tjia in forum Application Server Version 11 - Web/Browser Applications
    Replies: 10
    Last Post: 11-09-2012, 07:40 PM
  5. refresh fields in repeating section
    By bobby123 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 07-24-2012, 02:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •