Dynamic Drop Down Population
I have found this useful and assume others will as well. For this activity, I have a form that allows the user to select a sport, which is a lookup field to my sports form. Once a sport is selected, I have two drop down fields that are for event types and location. These 2 fields will be populated based on the sport selection, by getting the record of the sport and then checking for the event types and locations registered to that sport. The code is as follows:
// create empty collections to hold the fetched datalocations = Collection();
event_types = Collection();
//make sure that a sport value is selectedif(Team.Team_Name != null || Team.Team_Name != ""){
// fetch the data for the sport sport_data = Sports[Sport_Name == input.Team.Sports.Sport_Name]; if(sport_data.count() > 0) {
//start filling our event collection variable
for each event in sport_data.Event_Types { event_types.insert(event.Event_Type); }
//start filling our event location collection
for each location in sport_data.Locations { locations.insert(location.Location); } }
//add all of our collections to their respective drop downs
input.Event:ui.add(event_types); input.Location:ui.add(locations);}
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
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
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.