Results 1 to 5 of 5

Thread: Building Picklist

  1. #1
    Senior Member
    Join Date
    Jan 2014
    Posts
    351

    Building Picklist

    Hi

    I would appreciate if you could provide a video on how to implement a picklist for a FK field in a table inside a form and grid section.

    Thanks & Best Regards

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Tekhong,

    Use the Choices attribute and specify a SQL Select statement. For numeric fields, use the Choices + Get data mapping / Set data mapping as demonstrated in the example_datamapping App.

    Name:  grid.jpg
Views: 576
Size:  105.2 KB

    Regards,

    Yvonne

  3. #3
    Senior Member
    Join Date
    Jan 2014
    Posts
    351
    Hi Yvonne

    Thanks but is there a situation we need to set both "Choices" and "Data Mappings"?

    Or is it the case of either "Choices" or the "Get/Set Mapping" setting?

    Thanks & Best Regards

  4. #4
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    Hi Tekhong,

    Taking the southwind orders table as an example, it contains the customerid field, e.g. 'ALFKI'. For that, I would just use choices - select customerid from customers - and include an 'order by' or 'where' clause if required. The orders table also has employeeid. If I wanted to display the lastname of the employee, rather than their id, I would use data mapping to display the lastname (Get data mapping) and my select statement would be based on the lastname. I would use the Set data mapping to store the employeeid for the selected lastname back to the table.

    So if you just want to display a choice list, just use choices and if you want to display a name or a description associated with an id (another field in the lookup table), use the get/set data mapping as well.

    Regards,

    Yvonne

  5. #5
    Senior Member
    Join Date
    Jan 2014
    Posts
    351
    Hi Yvonne

    If a have a PK that is related to many tables through FK in these tables, is there a way to setup the choices and get/set data mapping once or do I have to repeat the settings in all the sections that has the FK field. In my case, employee ID exist as a FK field in about 100+ tables. So do I have to do the same setup 100+ times?

    Your advice is much appreciated

    Thanks & Best Regards

Bookmarks

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
  •  
Journey into the Cloud
Join us