Legacy Dev Forum Posts

 View Only

Sign Up

Problem assigning a Number List variable to Value field of dropdown component

  • 1.  Problem assigning a Number List variable to Value field of dropdown component

    Posted 06-05-2025 19:14

    jcastro | 2023-03-30 14:26:04 UTC | #1

    Hello

    I am having a problem when I am trying to assign a number List Variable to the Value List of a dropdown script component. Apparently only can be assigned string List variables to that Value List field. So I need your help. The values that populate the number List Variable are get from a Data Action

    1. Is it possible to do cast-convert in the translationMap of the Data Action to cast the Number Array to a String Array? So I can asign that list to the Value List field of the script Component
    2. Besides the Cast-Convert in the dataaction, what other options do I have to assign the number List variable to the Value List of the Script Component?


    jcastro | 2023-03-31 20:29:37 UTC | #2

    Hello I was be able to capture the number value from the number List, but I am having a problem when I try to cast the number value to string. I am using the string({{val}}) function, but it does something wrong when the number has more than 5 digits. It transform the number in decimal and add e+[number] at the end.

    is there any way to prevent this, so I can get the number like a normal string?

    Thanks


    zubair | 2023-03-31 22:10:46 UTC | #3

    Hi

    are you assigning string({{val}}) to a Dynamic String variable? If you just assign {{val}} to Dynamic String variable, does it not become a string anyways?

    Cheers


    jcastro | 2023-03-31 22:10:31 UTC | #4

    it works like you say. I assigned {{val}} to a Dynamic String without the string({{val}}) and it does not modify the value. Thanks for your help


    system | 2023-05-01 22:10:45 UTC | #5

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 19226