Update subform dropdown field choices - on load workflow

Update subform dropdown field choices - on load workflow

Hi, 
I have a "Check In" form that has "Contacts" subform and a "Tickets" subform.

When the form is loaded, I want to populate one contact and the number of tickets. 
I want the "Contact" field in the "Tickets" subform to have the choice of "Contacts."

Attached is the "on load" workflow:

  1. // add default contact
  2. contact = Check_In.Contacts();
  3. contact.Name.first_name = "Adam";
  4. rows = Collection();
  5. rows.insert(contact);
  6. input.Contacts.insert(rows);

  7. //add tickets
  8. t = Check_In.Tickets();
  9. t.Ticket_field = "11111";
  10. tickets = Collection();
  11. tickets.insert(t);
  12. input.Tickets.insert(tickets);

  13. //qdd chioces
  14. choices = input.Contacts.Name.first_name;
  15. Tickets.Contact:ui.add(choices); 
when loading the form, the choices are not updated. Any ideas?

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now