Get a Jumpstart with our Sample Apps
Results 1 to 15 of 15

Thread: UX - load new record and repopulate

  1. #1
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    944

    Default UX - load new record and repopulate

    I have a "classic" scenario where the user browses the Reservations table using a grid, and either clicks the button to add a reservation (UX) or click the ReservationID to load that same UX in editing mode.
    Many times the customer would like to load a different reservation, maybe by entering the ReservationID in the ReservationID field or clicking a button that would ask for the REservationID to load.

    How can i do that?

    Thanks
    Jaime

  2. #2
    Member
    Real Name
    Sean OKelly
    Join Date
    Sep 2015
    Location
    Charleston, WV
    Posts
    76

    Default Re: UX - load new record and repopulate

    Sounds like you need to impliment an easy search/filter function. Just add a button that would always show up on the grid, when it's clicked have then type in the id, check to see if the id exists, and if so refilter to edit, and if not go to add a new record. I may be missing something....but it seems simple enough.

  3. #3
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    944

    Default Re: UX - load new record and repopulate

    Hi thanks for jumping in.
    I don't have problems with the grid, i want to load a different record **while not leaving** the UX, i.e in the UX enter a different ID and have it load the data and refresh the UX for the newly typed id

  4. #4
    Member
    Real Name
    Alex
    Join Date
    Oct 2015
    Location
    Perth, WA Australia
    Posts
    46

    Default Re: UX - load new record and repopulate

    Jaime, Can you please post a sample application / screenshots so we can all get on the same page
    Alex Collier

    "Give a man a fish and you will feed him for a day; teach a man to fish and he will eat forever."

    Version 12.4.5.2 Build 4770 >> Deploying to IIS 8.5 on Windows 2012 R2 Server in AWS

  5. #5
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    944

    Default Re: UX - load new record and repopulate

    I'll try to explain this more clearly. If that doesn't help, i'll take screenshots.

    I use a Read-only grid to browse Reservations. One field is the ReservationID which is set as link. Clicking on it runs the ajax callback "Run UX to Edit current row in Grid or Add new..." . In the Ajax callback settings it's set to "Edit" the UX.
    So clicking on ReservationID number 1234 for instance brings up the UX where the data for ReservationID 1234 is populated.
    At this point, sometimes the user wants to load ReservationID 1255 in the UX. Currently she has to close the UX, then lookup the ReservationID 1255 in the Grid then click on it to have it loaded in the UX.
    What i would like is instead of all this, to not leave the UX, just for instance enter the 1255 value in the ReservationID field in the UX and have it populate the UX with the new values

    Jaime

  6. #6
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    944

    Default Re: UX - load new record and repopulate

    Anyone?

  7. #7
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,542

    Default Re: UX - load new record and repopulate

    I'm confused. You say you have a grid and also mention a UX. So, do you have a grid embedded in a UX?
    Pat Bremkamp
    MindKicks Consulting

  8. #8
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,373

    Default Re: UX - load new record and repopulate

    Jamie,
    How about redesigning your UX as a list(the grid part) with a detail view for the list. Then have a search part for the list. Panelcards could be used to bring the detail view into view if space is short.

  9. #9
    Member
    Real Name
    Lee Vasic
    Join Date
    May 2010
    Location
    Salt Lake City
    Posts
    994

    Default Re: UX - load new record and repopulate

    I do something like this. Where do you put your reservation ID now in the UX? In a label? Just put it in a textbox. If the textbox value is changed (e.g. someone keys in a different number) run an Ajax callback and update the UX.

  10. #10
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    944

    Default Re: UX - load new record and repopulate

    Quote Originally Posted by Pat Bremkamp View Post
    I'm confused. You say you have a grid and also mention a UX. So, do you have a grid embedded in a UX?
    Hi Pat
    It's the "classic" scenario used for browsing a table (read-only grid) and using a UX for editing rows on that grid - when you click on a specific field in the grid, it runs the Ajax callback "open a UX to add or Edit current row in grid"
    The issue i have is i don't want to close the ux ( back to the grid ), look up a new reservation, click on it ( brings up the ux for editing ), but rather stay in the ux and load from there a different record

  11. #11
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    944

    Default Re: UX - load new record and repopulate

    Quote Originally Posted by Lance Gurd View Post
    Jamie,
    How about redesigning your UX as a list(the grid part) with a detail view for the list. Then have a search part for the list. Panelcards could be used to bring the detail view into view if space is short.
    Thought about this, but it's too much pain, and the grid does a great job which will be hard to top with the list

  12. #12
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    944

    Default Re: UX - load new record and repopulate

    Quote Originally Posted by lvasic View Post
    I do something like this. Where do you put your reservation ID now in the UX? In a label? Just put it in a textbox. If the textbox value is changed (e.g. someone keys in a different number) run an Ajax callback and update the UX.
    Exactly! My question is what Ajax callback to run

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

    Default Re: UX - load new record and repopulate

    here is a thinking, haven't tested this yet.
    Code:
    you have read only grid when you click on a button a dialog opens to edit that record, you also want to just change the number pertaining to the id then the corresponding record should come and you should be able to edit and save.
    if so far correct, i do not believe you can accomplish this without coding yourself to do all those things.
    here is the outcome of that thinking:
    1> keep the read only grid.
    2> create a dialog to match the table fields and on the id field onChange event do an action javascript to populate the dialog with the rest of the data from the table.
    3> on dialog execute event declare a variable and set it to parent object and using that get the id and put that into the dialog id. ( since onChange event will fire it will populate the dialog, same thing when you change the id.
    4> on the dialog submit you do not use built in save action, but you use your own connection string and update sql query to backend ( if i remember it is mariaDB)
    5> in the grid on the button to open the dialog, turn off warn if component is dirty, and turn off using cache dialog.
    this might do what you want to do.
    if i have time i will test sometime this week.

    edit: if you do not need to edit the data then submit reset buttons are not needed nor the self written update sqlQuery.
    then you can keep all the things you have except add the on change event for the id.
    Last edited by GGandhi; 12-27-2017 at 10:38 AM.
    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

  14. #14
    Member
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    944

    Default Re: UX - load new record and repopulate

    Quote Originally Posted by GGandhi View Post
    here is a thinking, haven't tested this yet.
    Code:
    you have read only grid when you click on a button a dialog opens to edit that record, you also want to just change the number pertaining to the id then the corresponding record should come and you should be able to edit and save.
    if so far correct, i do not believe you can accomplish this without coding yourself to do all those things.
    here is the outcome of that thinking:
    1> keep the read only grid.
    2> create a dialog to match the table fields and on the id field onChange event do an action javascript to populate the dialog with the rest of the data from the table.
    3> on dialog execute event declare a variable and set it to parent object and using that get the id and put that into the dialog id. ( since onChange event will fire it will populate the dialog, same thing when you change the id.
    4> on the dialog submit you do not use built in save action, but you use your own connection string and update sql query to backend ( if i remember it is mariaDB)
    5> in the grid on the button to open the dialog, turn off warn if component is dirty, and turn off using cache dialog.
    this might do what you want to do.
    if i have time i will test sometime this week.

    edit: if you do not need to edit the data then submit reset buttons are not needed nor the self written update sqlQuery.
    then you can keep all the things you have except add the on change event for the id.
    That's more or less what i thought doing ( in the onChange or onBlur of the ReservationID field reload the data then refresh the UX fields with the loaded record ). I posted here thinking there is a basic alpha anywhere function that does just that, like LoadPrimaryKeys or similar...
    I'm pretty sure this can be done with just a few Alpha Anywhere commands, i believe even client side

  15. #15
    Member
    Real Name
    Sean OKelly
    Join Date
    Sep 2015
    Location
    Charleston, WV
    Posts
    76

    Default Re: UX - load new record and repopulate

    I think you really need to investigate using the UX component with List and Details view. Then use a "hidden" search panel to accomplish what you want. Very easy to setup using a LIST control in the UX. I think you will find it much easier to impliment what you want that way.

Similar Threads

  1. Repopulate Drop Down bug
    By pcaspa in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 05-06-2012, 01:09 AM
  2. form.load()..... adding extra record
    By enstorms in forum Alpha Five Version 9 - Desktop Applications
    Replies: 9
    Last Post: 04-14-2009, 07:55 PM
  3. repopulate combobox
    By brainwater in forum Alpha Five Version 8
    Replies: 2
    Last Post: 04-09-2007, 11:53 PM
  4. Repopulate Combo Box
    By Scott Emerick in forum Alpha Five Version 5
    Replies: 8
    Last Post: 05-24-2003, 11:11 AM
  5. Form Load Query Record Count
    By Peter.Greulich in forum Alpha Five Version 4
    Replies: 5
    Last Post: 09-03-2001, 02:37 PM

Posting Permissions

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