How to use customFieldPicker to get its selected value

Hi everyone,

I am new to Appian and facing challenges in using customFieldPicker, we need to implement:

Do we have any Field where user can search for exiting list of values from database, and if value(text column in our case) is not there in the list then whatever value user has typed in can be written to DB on the form submission. Later the value will become part of the list.

We implemented it like this:

We have one table having 2 fields- id and text only. The ER we created is attached below:

We are unable to save the value. Please let me know what I am doing wrong.

Thank you!

  Discussion posts and replies are publicly visible

Parents
  • Additionally, and strangely enough, I just posted a solution for almost the exact same question 3 days ago in this thread..

    Basically what we do in this case where we need to use the picker component only, is append the search value to the searchFunction (when it does not exist) in the datasubset that is returned to the picker.  Query for data, return data+search.

    After the form is submitted, query the DB to see if the selected value actually exists, and if not, write it to the list.

  • 0
    Certified Lead Developer
    in reply to Chris
    append the search value to the searchFunction (when it does not exist) in the datasubset that is returned to the picker

    Oh nice, I was wondering how this would work.  I feel like I must've seen something similar before, but TBH i use the function so infrequently I usually forget.  The only thing I've used it for in the past that I really like is an "alternate user picker" i made, which allows users to be picked from the DB, and can include deactivated folks (and can allow them to be searched by their DB PKID, which we expose to the end users as the person's personal ID).  But of course for this there's no need for adding entries via component trickery.

Reply
  • 0
    Certified Lead Developer
    in reply to Chris
    append the search value to the searchFunction (when it does not exist) in the datasubset that is returned to the picker

    Oh nice, I was wondering how this would work.  I feel like I must've seen something similar before, but TBH i use the function so infrequently I usually forget.  The only thing I've used it for in the past that I really like is an "alternate user picker" i made, which allows users to be picked from the DB, and can include deactivated folks (and can allow them to be searched by their DB PKID, which we expose to the end users as the person's personal ID).  But of course for this there's no need for adding entries via component trickery.

Children
  • Yea, our biggest use case for this component is also as a Custom User Picker essentially.  With ~30k licensed employees, there are so many similarly named user accounts, we can't use the OOTB picker at all, unless we are stuck with it such as with the built-in task reassignment GUI.  Works great in all other cases though, as you note you can expand the search to employee IDs, append metadata to the display such as city, state, division, department, etc.  We have a few financial pickers for project/task values also, and some other cases sprinkled around here and there.

    We have only had a few situations for appending values to the picker, one in a professional certification request - we maintain a list of known certs, but there are always new ones we don't know about.  One other is in a Meeting Minutes type app I have, where meetings are joined by Topic, the Topic searches for prior meetings and also lets a new one be created in the same place.  I do have to admit, I find that to be pretty clunky in use however.