ui.add() function - Add a different code Value and description Value

ui.add() function - Add a different code Value and description Value

I have a Stateless form with onClick action to update a zoho CRM record.


I'm using zoho.crm.searchRecords to get a filtered list and then dynamically populating a pick list using ui.add()


My problem: I need the code value to be the CASEID and the text value to be the Case Name.


EG:


  1. <option value="CASEID">Case Name</option>


Currently when I populate the pick list it looks like


  1. <option value="Case Name">Case Name</option>


Appreciate any help... I've been reading up for a few days trying to figure it out!