Creating a Form Picklist using criteria based on common ID from different Form records
I am trying to create a Picklist that has a criteria based on a common ID stored in different Form records. Here is the scenario:
ACCOUNT Form
- creates records for Companies
- unique record ID is created (Account.ID)
CONTACT Form
- creates contacts with reference to Account.ID (Contact.Account_Name)
- has field Full_Name for Person's Name (Contact.Full_Name)
NOTES Form
- has picklist that imports Contact.Full_Name (Notes.Contact)
- has the parameter Account.ID fed into it and stored (Notes.Account_ID)
The default for the NOTES Form when adding a new record is for the picklist to import all the contact records. I want to filter the picklist to include only Contact records from a specific Account.
So the default picklist in the NOTES Form is defined as follows:
Note_Contact
(
displayname = "Contact"
type = picklist
values = Contact.Full_Name
sortorder = ascending
)
Using field criteria, I tried to narrow down the Contact.Full_Name selections using:
Note_Contact
(
displayname = "Contact"
type = picklist
values = Contact[Account_Name.ID == input.Account_ID].Full_Name
sortorder = ascending
)
I thought the above would select the Contact.Full_Name records where the Account_Name.ID field value for the fetched Contact.Full_Name records are equal to the NOTES Form parameter for Account_ID. However I get an obscure error stating that "Variable 'this' is not declared".
I thought another way could be to create a deluge script under "on load" for the Form, but I cannot find any examples of how to populate a Form picklist field using criteria with deluge scripting in an "on load" actions section.
Any ideas?
Cheers,
Neil