Home > Forum > General > Choice field multiple values

Choice field multiple values
0

Hello,

I have created a Choice field that allows multiple values.
I noticed that the 'wfd_attchoose' column saves both the ID and Name, while the 'wfd_attchoose1_id' column only stores the first ID.
I am wondering why I cannot see all the IDs and how I can extract each value individually.

Can you help me with a suggestion? Thank you.

MVP
In reply to: AndreeLl B

I have created a DB with the following query:
select dbo.ClearWFElemID(WFD_AttChoose1) as CategoryIDs, wfd_id as id from wfelements

and it is returning only the first ID from my Choice field-multiple values.

Ah, this one is not in the article - you could use ClearWFElemIDAdv like this:

SELECT WFD_AttChoose1, dbo.ClearWfElemIDAdv(WFD_AttChoose1) as x FROM WFElements WHERE WFD_ID = 123123

You will probably also need dbo.SplitToTable, below two possibilities how to use them:

-- ClearWFElemID Example

SELECT
dbo.ClearWfElemID(query.item) As ID,
dbo.ClearWfElem(query.item) As Value
FROM
dbo.SplitToTable((
SELECT WFD_AttChoose1 as x FROM WFElements WHERE WFD_ID = 123123
), ';') as query

-- ClearWFElemIDAdv Example

SELECT
query.item
FROM
dbo.SplitToTable((
SELECT dbo.ClearWfElemIDAdv(WFD_AttChoose1) as x FROM WFElements WHERE WFD_ID = 123123
), ',') as query