PDA

View Full Version : Change the CONTROL TYPE dynamically


ABC123

pettechservices
05-28-2013, 05:16 PM
Hi,

I was wondering if I can change the control type dynamically on a UX?

Basically, I want to present a list of questions that the user can choose from.

The question would then have an answer window, which would then be a textbox, dropdown, radio button, etc etc.

Any way of doing this? Especially in a repeating section (not a requirement exactly).

Thank you for any tips!
Chris

Pat Bremkamp
05-28-2013, 07:45 PM
Hi Chris,
I do something similar, but not as elegantly as you want to do it. In my case, some of fields in the table are:

LINE_TYPE used to determine answer type, such as write_in_value, write_in_text, lookup_text,logical, etc
QUESTION The question being asked
QUESTION_HELP On demand help for the question
LOOKUP_NAME If it is a lookup, this is used in the filter for possible answers
YES_NO_ANSWER
VALUE_ANSWER
VALUE_ANSWER_UNITS
SHORT_TEXT_ANSWER
DATE_ANSWER
SINGLE_DROPDOWN_CHOICE
SINGLE_DROPDOWN_MORE The "more fields are to allow writing in an answer if it is not in the dropdown list, or more info
MANY_DROPDOWN_CHOICE
MANY_DROPDOWN_MORE

Then, I use "merge Cells" to merge all the answer fields into a single field and use show/hide to show only the one based on the line_type.
Works great. Looks like
35682

pettechservices
05-28-2013, 09:54 PM
Pat, thank you!! You have certainly pointed me in the right direction, and seems pretty simple now! lol Thank you!!!