Is there any way to retrieve the fields of CDT and store in a variable (multiple

Is there any way to retrieve the fields of CDT and store in a variable (multiple type)? Scenario: I have to fetch all the fields of CDT (like- EmpId, EmpName, DOJ etc.) and showed them in a drop down options of a form interface.

OriginalPostID-221268

OriginalPostID-221268

  Discussion posts and replies are publicly visible

Parents
  • @amit

    Yes we can do it . Call a queryentity to a particular table if CDT is mapped to database or pass the Cdt into interface rule of anytype

    Scenario 1:(cdt has duplicate values but I need take unique and show in dropdown)

    To do so use queryentity and fetch the data and store it in a local variable. Using union or intersection function u can pick the unique values. And now in dropdown field you can use like the below

    choiceLabels:local!variable
    choice Value:local!variable

    Scenario2 :(subset or cry itself has unique data)
    This is something straight forward and you can fetch data and store in a local variable. Pass that local variable as said above

    Hope this helps ...!!!
Reply
  • @amit

    Yes we can do it . Call a queryentity to a particular table if CDT is mapped to database or pass the Cdt into interface rule of anytype

    Scenario 1:(cdt has duplicate values but I need take unique and show in dropdown)

    To do so use queryentity and fetch the data and store it in a local variable. Using union or intersection function u can pick the unique values. And now in dropdown field you can use like the below

    choiceLabels:local!variable
    choice Value:local!variable

    Scenario2 :(subset or cry itself has unique data)
    This is something straight forward and you can fetch data and store in a local variable. Pass that local variable as said above

    Hope this helps ...!!!
Children
No Data