Retrieve Page Type Fields Datasource Values

Kelly Shepard asked on January 27, 2022 01:31

Kentico 11 - I have a page type field (multiple choice) that contains a list of options. On my page, I have a query datasource and repeater. I need to select the values that are in that list of options. Please advise :-)

Recent Answers


Dmitry Bastron answered on January 27, 2022 05:01

Hi Kelly,

Could you please add a bit more context to your question? Is that correct, your page type's multichoice field stores a bunch of keys (or IDs) and in the repeater you'd like to select connected objects by these keys?

If so, if you expand Advanced configuration of the multichoice control there will be a separator field, which is pipe "|" by default. If you change it to be comma "," then you'll be able to use this value in Where condition of your query datasource.

1 votesVote for this answer Mark as a Correct answer

Kelly Shepard answered on January 27, 2022 16:57 (last edited on January 27, 2022 17:08)

I would actually like to populate the repeater with the list of options that I have in the datasource of that field.

Image Text - https://www.screencast.com/t/Ralaarab

So, basically I am using the repeater to create checkboxes with labels that are the options in the datasource field.

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on January 31, 2022 05:51

I don't think you'd be able to do it like this. However, if you'd like to have one data source managed centrally for both page type and repeater I'd recommend creating custom table (or module custom class) to store this dictionary and then configure repeater and page type field to query options from this custom table.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.