How to populate a dropdown in zoho creator with data from zoho crm contacts

How to populate a dropdown in zoho creator with data from zoho crm contacts

I tried this code, but I can see al my contacts in debug that is a multiline debug field I created to check and debug but the dropdown (named crm) is empty.

Where is my error? many thanks Paolo

clear crm;

// Recupera fino a 200 contatti da Zoho CRM

response = zoho.crm.getRecords("Contacts", 1, 200);


// Inizializza una lista vuota per il dropdown

options_list = list();


// Verifica se ci sono dati nella risposta

if (response != null && response.size() > 0) {

    for each contact in response {

        nome_completo = contact.get("Last_Name") + " " + contact.get("First_Name");

        record_id = contact.get("id");


        // Aggiungi i valori al dropdown

        options_list.add({nome_completo: record_id});

    }


    // Associa la lista di opzioni al dropdown

    input.crm = options_list;


    // Debug per confermare il popolamento

    input.Debug = "Dropdown popolato con " + options_list.size() + " contatti.";

} else {

    input.Debug = "Nessun contatto trovato in Zoho CRM.";

}