User Tools

Site Tools


questionoptions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
questionoptions [2025/02/04 11:24] – created gloriaquestionoptions [2025/03/10 06:14] (current) gloria
Line 1: Line 1:
-#  ^ **Name**                  ^ Type         ^ Comments  +====== Introduction: ====== 
-| 1  | **id**                     | int         | AUTO_INCREMENT | + 
-| 2  | **qdetailid**              | int         | id of fw_questionnairedetails | +This table outlines the detailed structure of the **QuestionnaireDetailsOptions** table, which stores information about the options (answer choices) associated with each question in a questionnaire. Each record corresponds to an option with specific settings, such as display order, graph order, open answer configuration, colors, icons, and special display conditions. Additionally, the table allows configuring option-level behavior, such as excluding other options when one is selected, hiding options in reports, or defining conditions for displaying options. 
-| 3  | **optionorder**            | int          + 
-| 4  | **graphorder**             | int          +The table is linked to the **QuestionnaireDetails** table via the **qdetailid** column and plays a crucial role in defining the behavior of options in the survey. 
-| 5  | **optiontype**             | int          + 
-| 6  | **openanswer**             | int         0=no openanswer,1= show open answer for this option,2= show open answer with long box,3=show open answer when option selected;4=email type; 5=phone type; 6=postal code, 7=show openanswer textbox without radio button or checkbox; 8=Date type; 9=OTP Verification; 10=maxvaluetype; 11=phone type and used to send google reviewsms; 12=numbertype with 0 to 100 range; 13=numbertype with 1 to 100 range; 14=Any positive number +Below is the list of fields in the **QuestionnaireDetailsOptions** table along with their descriptions, data types, and comments. 
-| 7  | **openanswerforopt**       | int         1=display open text box for options,0=display normally. (used to display opentextbox type rapporticifier questions+ 
-| 8  | **graphcolor**             | varchar(10) |  +**Sr. No.** ^ **Name**                  ^ **Type**         ^ **Description**                                                                                          ^ **Comments**                                                                                         
-| 9  | **textcolor**              | varchar(10) |  +| 1           | **id**                     | int              | Unique identifier of the option record.                                                                | AUTO_INCREMENT                                                                                         
-| 10 | **apptextcolor**           | varchar(10) | used for coloring the text to be shown in case details in mobile app +| 2           | **qdetailid**              | int              Foreign key referring to **id** of the **fw_questionnairedetails** table.                               | Links the option to its question.                                                                      
-| 11 | **emotioncolors**          | text        saves the emotions colors with separator "^||^"Count of emotion colors equal to count of emotion question options. | +| 3           | **optionorder**            | int              Defines the display order of the option in the survey.                                                 | Determines the sequence of options in the question.                                                   
-| 12 | **icon**                   | longblob    display this image for options for questiontypecode 5 or 7 or 6 questions. | +| 4           | **graphorder**             | int              Defines the order of the option in graph reports.                                                      | Allows different order in the report graph.                                                           
-| 13 | **enlargeicon**            | longblob    This column is set for questiontypecode=6 questions. This image will be displayed in next follow-up questions of this question in enlarged state. | +| 5           | **optiontype**             | int              Type of option (future use or custom use).                                                             | Currently not standardized.                                                                            
-| 14 | **iconsize**               | int         40 +| 6           | **openanswer**             | int              Determines if an open-answer textbox should appear along with the option.                              | Multiple modes for open text are available based on selection. Refer comments.                       
-| 15 | **status**                 | int         | 1=active,0=inactive | +| 7           | **openanswerforopt**       | int              Defines if the open text box should appear without radio/checkbox.                                      | Used specifically for Rapportcifer-type questions.                                                    
-| 16 | **redirecttoinfo**         | int          +| 8           | **graphcolor**             | varchar(10)      Sets the color of the graph bar for this option.                                                       | Hex color code.                                                                                       
-| 17 | **optionquery**            | text         +| 9           | **textcolor**              | varchar(10)      Sets the color of the option text.                                                                     | Typically used to enhance visibility of the option text.                                              
-| 18 | **updateparams**           | text         +| 10          | **apptextcolor**           | varchar(10)      Text color to be displayed in mobile app case details.                                                 | Specifically used in mobile apps to highlight certain options.                                        
-| 19 | **selectparams**           | text         +| 11          | **emotioncolors**          | text             Saves emotion-based colors separated by **"^||^"**                                                  | Used when displaying emotion-based questions                                                       
-| 20 | **optiondisplayparamcond** | text        condition whether to show this option in questionnaire or not. | +| 12          | **icon**                   | longblob         Stores the image/icon to represent the option.                                                         | Typically used for NPS, Image Picker, or Rapportcifer questions.                                      
-| 21 | **excludeotheropts**       | int         If we select this option, other options of this question are faded out on survey +| 13          | **enlargeicon**            | longblob         Enlarged image of the option that appears in follow-up questions.                                      | Specifically for Image Picker (questiontypecode=6).                                                   
-| 22 | **hideinreports**          | varchar(100)| contains the option IDs that are to be excluded in corresponding questions when this option is answered +| 14          | **iconsize**               | int              Defines the size of the icon in pixels.                                                                | Default is **40px**.                                                                                   
-| 23 | **randomorder**            | int         differentiates the options that can be sorted from the ones that are to be shown at the bottom strictly. | +| 15          | **status**                 | int              Status of the option (1=active, 0=inactive).                                                           | Active options appear in the survey.                                                                  
-| 24 | **hideinbubblegraph**      | int          +| 16          | **redirecttoinfo**         | int              Determines if the option should redirect to another information screen.                                | Typically used in dynamic questionnaire flows.                                                        
-| 25 | **optionscore**            | int         | 0 |+| 17          | **optionquery**            | text             Query to fetch dynamic options from another table.                                                     | Allows dynamically loaded options based on user input.                                                
 +| 18          | **updateparams**           | text             Contains parameters to update another table based on the answer.                                       | Useful for dynamic content or external data updates.                                                 
 +| 19          | **selectparams**           | text             Defines the select parameters for dynamically loaded options.                                          | Typically used when fetching options from another source.                                             
 +| 20          | **optiondisplayparamcond** | text             Condition to display the option based on prior answers.                                                | Allows hiding or showing options based on conditions                                                
 +| 21          | **excludeotheropts**       | int              Determines if selecting this option should exclude other options.                                       | When selected, other options become disabled or faded out.                                            
 +| 22          | **hideinreports**          | varchar(100)     List of option IDs to be hidden in reports if this option is selected.                                 | Useful for internal use where certain responses should not appear in reports.                        
 +| 23          | **randomorder**            | int              Defines if the option should appear in random order.                                                   | Typically used in multi-response questions to avoid bias                                            
 +| 24          | **hideinbubblegraph**      | int              Determines if the option should appear in the bubble graph.                                            | Used in visual representation of survey results.                                                     
 +| 25          | **optionscore**            | int              Score assigned to the option for calculating overall results.                                          | Can be used for scoring-based questions.                                                             | 
 + 
 +====== Explanation of Special Columns ====== 
 + 
 +1. **openanswer (Column 6)** - This column is crucial for configuring open-ended answers in options. Below are its possible values: 
 + **0** = No open answer box. 
 + **1** = Show open answer box next to option. 
 + **2** = Show open answer box with a long text area. 
 + **3** = Open answer appears only when the option is selected. 
 + **4** = Email input type. 
 + **5** = Phone input type. 
 + **6** = Postal code input type. 
 + **7** = Textbox appears without radio or checkbox. 
 + **8** = Date picker input. 
 + **9** = OTP (One-Time Password) input for verification. 
 + **10** = Max value input type. 
 + **11** = Phone input with SMS/Google Review triggers. 
 + **12** = Number input with a 0-100 range. 
 + **13** = Number input with a 1-100 range. 
 + **14** = Accepts any positive number. 
 + 
 +2. **optiondisplayparamcond (Column 20)** - This column controls the display of options based on previous answers. For example: 
 +if Q1=2 then show Option A, else hide Option A 
 + 
 +3. **excludeotheropts (Column 21)** - If enabled (value = 1), selecting this option will disable/fade out all other options for the same question. 
 + 
 +4. **emotioncolors (Column 11)** - For emotion-based questions, this column stores multiple color codes separated by **"^||^"** for each emotion option. 
 + 
 +5. **optionquery (Column 17)** - This allows dynamic loading of options from external tables based on user input. Example query: 
 + 
 +SELECT optiontext FROM fw_options WHERE questionid=1; 
  
questionoptions.1738668244.txt.gz · Last modified: 2025/02/04 11:24 by gloria