How can i populate a dropdown field with the database table's column values

How can i populate a dropdown field with the database table's column values....

OriginalPostID-96558

OriginalPostID-96558

  Discussion posts and replies are publicly visible

Parents
  • To expand on Sathya's comment, you can create a query rule that pulls a list of CDTs from the database. Within your dropdown field, set the choiceLabels to be the text values for each CDT using:

    index([list of CDTs], [column name], {})

    Set the choiceValues in a similar way. Assuming you'd like to store a lookup value in your database, the field in your CDT would be the primary key from the database.

    index([list of CDTS], [primary key field], {})

    Hope this helps anyone who sees this thread in the future.

Reply
  • To expand on Sathya's comment, you can create a query rule that pulls a list of CDTs from the database. Within your dropdown field, set the choiceLabels to be the text values for each CDT using:

    index([list of CDTs], [column name], {})

    Set the choiceValues in a similar way. Assuming you'd like to store a lookup value in your database, the field in your CDT would be the primary key from the database.

    index([list of CDTS], [primary key field], {})

    Hope this helps anyone who sees this thread in the future.

Children
No Data