Alpha DevCon 2018
Results 1 to 11 of 11

Thread: Populate and Update Textboxes with List Control

  1. #1
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    514

    Default Populate and Update Textboxes with List Control

    In a List Control I have mapped fields to textboxes so they display information when a item is selected. However, I want the user to be able to change the information and click submit and change the information in the database. What is the best way to do this? When I try to change it now and hit submit, it saids "Could not set argument values. Expected Value". Is there something I have to do in the List Control to be able to update the information it populates?

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,731

    Default Re: Populate and Update Textboxes with List Control

    Are you running a List / Detail View scenario? The usual process is select, change, save, submit... although you can combine save and submit.

    What is the code running in your submit button?

    I hope you're not running a data bound UX.

    Not a lot of information to go on.

  3. #3
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    514

    Default Re: Populate and Update Textboxes with List Control

    Yes, mapping the fields in the Detail View of the List Control. The only code I have in the submit button is: Each text box I have bound to table and field name in the data binding section.

    {dialog.object}.submit();

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,731

    Default Re: Populate and Update Textboxes with List Control

    I had a feeling that's what you had... from the detail and description language used.

    I'm not sure your setup could have many more errors.

    You do not want a data bound UX... remove all data binding from the UX.

    When using an List Control... all data binding flows through the List... not the UX.

    Read through this...https://www.alphasoftware.com/docume...View/index.xml

    It's most likely outdated since Alpha doesn't update it's doc very often... but it looks close enough... although quite incomplete.

    In Step # 8, you'll see in the screenshot an option to "Add buttons to the List Detail to perform actions...". Check this on... why it's not checked on in the walk-through I don't know - it certainly should be. This will add default buttons for Save and Synchronize.

    Save will save your textbox edits back to the List.
    Synchronize will submit those List changes to your database.

  5. #5
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    514

    Default Re: Populate and Update Textboxes with List Control

    Followed this but still not updating the information. The textboxes are in a different panel card than the list control, is that the issue? However, its not throwing that error anymore. In that quick genie setup is there anything special that has to be done when the textboxes are in a different panel card?

  6. #6
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,731

    Default Re: Populate and Update Textboxes with List Control

    It doesn't matter where your Detail View Controls are... long as they're in the same UX. That's the whole idea... the List Control fills the PanelCard... you tap to select a row... navigate to the PanelCard holding the Detail View controls, modify, save, back to the List... repeat... then sync.

    Is your List Control based on a SQL Table?

  7. #7
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    514

    Default Re: Populate and Update Textboxes with List Control

    Yes the list control is based on a SQL Table. I created the textboxes, should I delete those textboxes and go back through the genie to create them? Then move the textboxes to the panel card I want?

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

    Default Re: Populate and Update Textboxes with List Control

    You need to ensure the textboxes you have on the UX are linked/mapped with the lists detail view. If you did not create via genie you will need to link theses textboxes yourself.
    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

  9. #9
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    514

    Default Re: Populate and Update Textboxes with List Control

    I did this. It is displaying the data but it wont allow to update it. Is there something that has to be changed to allow user to update the data in the textboxes?

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

    Default Re: Populate and Update Textboxes with List Control

    Hi Steven,

    Start over. Delete what you have. Start a new UX component. Use the List genie to get you going, including the detail view. View how all that is setup and then you can try and customize one yourself.

  11. #11
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    514

    Default Re: Populate and Update Textboxes with List Control

    Got it, in the list control in detail view, table properties, had to check allow update under permissions

Similar Threads

  1. Populate a List Control's Detail View Programmatically
    By Pizzadude in forum Mobile & Browser Applications
    Replies: 16
    Last Post: 11-27-2016, 12:58 PM
  2. Populate a List Control Based on a Session Variable
    By Pizzadude in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 08-24-2016, 09:39 AM
  3. How do I populate a list control with a selection made from a drop-down?
    By mbunds in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 10-22-2015, 04:30 PM
  4. Dynamically populate fields into a list control
    By Peter.Greulich in forum Mobile & Browser Applications
    Replies: 7
    Last Post: 03-02-2015, 08:37 AM
  5. Xbasic code changes Textboxes to non-updateable, but not other control types
    By al mecklenburg in forum Application Server Version 8
    Replies: 4
    Last Post: 01-18-2008, 12:42 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
  •