Subform auto populate values

Subform auto populate values

Hi Team,

I’m trying to retrieve values from Zoho People using API functions and dynamically populate them into a subform. For example, I’ve created a form with several fields that users will fill out. Based on their input, I need to fetch records from Zoho People—such as Department and Location—and then append these filtered values to a subform.

I attempted the following approach, which works fine for normal fields but throws an error when used for subform fields:

clear Location; for each employee in emp_response { loc = employee.get("LocationName"); if(loc != null && loc != "" && loc != "null") { input.Location:ui.append(loc); } }

How can I correctly append these values to my subform?