CA Service Management

Expand all | Collapse all

Populate select field from data object that uses input from a text field

  • 1.  Populate select field from data object that uses input from a text field

    Posted Jan 09, 2017 10:09 AM

    Hi,

    I am trying to populate a select field based on the results of a data object that uses input from a text field. Testing the data object, it returns the correct data. However when I click on the select box after inputting text into the UserIDSelection field, the data object doesn't return data.


    Select field:
    _id: group_id_del

    Report/Plug-in Id: a82c537302097-1c7f0e11591d54a35b-52621483542573729
    Report/Plug-in variable: $({'Userid_for_sdm_access':ca_fdGetTextFieldValue(ca_fd.formId,'UserIDSelection')})

     

    Text field:
    _id: UserIDSelection

     

    Data object: a82c537302097-1c7f0e11591d54a35b-52621483542573729
    Table: ca_contact
    Fields: last_name
    Query:

    SELECT C.contact_uuid, C.last_name
    FROM ca_contact C
    JOIN grpmem G ON C.contact_uuid = G.group_id
    WHERE C.contact_type = 2308 AND C.inactive = 0
    AND G.member = (SELECT CNT.contact_uuid FROM ca_contact CNT WHERE CNT.userid='%Userid_for_sdm_access%')
    ORDER BY C.last_name ASC

     

    Any assistance is appreciated!



  • 2.  Re: Populate select field from data object that uses input from a text field
    Best Answer

    Posted Jan 09, 2017 10:40 AM

    Hey Grant,

     

    Try updating 'Fields' to the following in your data object:

     

    Fields: contact_uuid,last_name

     

    In order to populate a select field the data object needs to return 2 columns (which your query already does).

     

    Thanks,
    Jason 



  • 3.  Re: Populate select field from data object that uses input from a text field

    Posted Jan 10, 2017 10:09 AM

    Thank you Jason, that did the trick!