Skip to main content
Known Participant
Nov 29, 2026 6:29 PM UTC
Answered

Dropdown from values of fields

Hi, I have text fields Text1-10, and a dropdown field, is it possible to populate dropdown from text fields values. For example, I write Banana in one field, and it adds to dropdown list . . .etc?

    Nesa Nurani
    Nesa NuraniCorrect answer
    Community Expert
    Nov 29, 2026 6:31 PM UTC

    Yes, that is possible with a script, you can use something like this in dropdown field as ‘Calculation’ script:
     

    if (event.source && /^Text([1-9]|10)$/.test(event.source.name)) {
    var aList = [];
    for (var i = 1; i <= 10; i++) {
    var cValue = this.getField("Text" + i).valueAsString;
    if (cValue.length > 0) {
    aList.push(cValue);}}

    event.target.setItems(aList);}

     

    1 reply

    Nesa Nurani
    Community Expert
    Nesa NuraniCommunity ExpertCorrect answer
    Community Expert
    Nov 29, 2026 6:31 PM UTC

    Yes, that is possible with a script, you can use something like this in dropdown field as ‘Calculation’ script:
     

    if (event.source && /^Text([1-9]|10)$/.test(event.source.name)) {
    var aList = [];
    for (var i = 1; i <= 10; i++) {
    var cValue = this.getField("Text" + i).valueAsString;
    if (cValue.length > 0) {
    aList.push(cValue);}}

    event.target.setItems(aList);}

     

    Translate