Newbies Bob Von Scio Posted April 23, 2024 Newbies Posted April 23, 2024 I'm building a survey app and I have multiple types of questions that fall broadly into two categories: Single Mention and Multiple Mention. Is there a way to conditionally set the answer fields to either be radio buttons or checkboxes depending on the question type? For example, each question has an "instruction" field that says if it's One Mention or Multiple Mention. So I'd like to do a condition like If MyTable::InstructionText = "One Mention" the responses are radio buttons and if it's Multiple Mention, it's a checkbox set.
Ocean West Posted April 23, 2024 Posted April 23, 2024 I would not use the native radio / checkbox but would rather use button bar segments and with your template for the survey indicate the response type. And use hide object when feature to hide or show the controls needed, to allow the single or multi selections. I build an survey for inspectors using button bar segments another option
comment Posted April 23, 2024 Posted April 23, 2024 (edited) You cannot conditionally format a field to be either a checkbox or a radio button set. But you can place two separate instances of the field onto the layout and hide one of them based on the question type. Or place them in separate panes of a slide control object and use an OnRecordLoad script trigger to select the correct pane. Edited April 23, 2024 by comment
Newbies Bob Von Scio Posted April 23, 2024 Author Newbies Posted April 23, 2024 I think I'm leaning more toward having the separate instances of the field on the layout and hiding them based on type. OceanWest, thank you for the response. I don't really understand how I would use that for these questions. Here are a couple of examples: Are you the person, or do you share in the responsibility for making financial decisions for your household? (ONE MENTION) DECISION MAKER-FINANCIAL 02600001 1 Yes/Share 2 No At which financial institutions do you currently have any type of account? (MULTIPLE MENTIONS) PROBE: WHAT OTHERS? PROBE: CREDIT UNION – “SPECIFICALLY WHICH ONE?” ALL INSTITUTIONS 02600351 1 Bank of America 24 Lake City Bank 2 Beacon Credit Union 25 Midwest America Federal CU 3 Capital One 26 Old National 4 Centier Bank 27 Online Bank (no local branches) 5 Charles Schwab 28 Partners First FCU 6 Chase 29 Philips Federal CU 7 Chime 30 PNC Bank 8 Citibank 31 Professional FCU (ProFed) 9 East Allen Co. Schools CU 32 Public Service CU 10 Edward Jones 33 Salin Bank 11 Farmers & Merchants Bank 34 Star Financial Bank 12 Fidelity 35 State Bank & Trust 13 Fifth 3rd Bank 36 Teachers Credit Union 14 Financial Partners Federal Credit Union 37 Three Rivers Federal CU 15 First Merchants Bank 38 Thrivent Financial 16 First Source 39 Union Federal Savings Bank 17 Fire Police City County FCU 40 USAA 18 Flagstar Bank 41 Wells Fargo 19 Fort Financial Federal CU 42 Woodforest National Bank (Walmart) 20 Garret State Bank 43 Other (Specify) 21 General Federal CU 44 Don’t Know 22 Horizon Bank 45 None 23 IAB Financial 46 Refused
Søren Dyhr Posted April 23, 2024 Posted April 23, 2024 2 hours ago, Bob Von Scio said: Is there a way to conditionally set the answer fields to either be radio buttons or checkboxes depending on the question type? I'm wondering if Google Forms, better meets your requirements here, and the case being more or less: https://www.filemakermagazine.com/videos/capturing-data-google-forms --sd
Newbies Bob Von Scio Posted April 23, 2024 Author Newbies Posted April 23, 2024 That won't work. I'm building a data collection tool for a company. This is only one small part of the functionality and it can't be offloaded to another application
Ocean West Posted April 23, 2024 Posted April 23, 2024 The way I would structure the logic would be the following: A template table this table could have child records if needed to outline the type of questions and responses you are asking. A template should be frozen for a particular campaign once deployed as any changes to the questions and response would skew any results. Each question to your respondent would present them the question and the target field for validated response: Text (large, small) Number ( integer, negative, in-range) Currency ( integer, negative, in-range) Percentage Boolean ( true, false) Date ( < = > value, in-range, duration ) Single Pick ( radio button ) Multiple Pick ( checkbox ) Likert Scale (defined rank) The user would have a session record where that is a join between the template and the user (if you need a blind survey it would be proxy for the person providing responses) The template itself could be represented as a JSON object and stored on the survey session record then you could build UI to iterate thru the object as you progress thru the questions, and responses. And then present the proper fields or other elements to allow the user to enter the values. ( it may be much more easier to use a web view with some JavaScript to render these dynamic elements ) If you need to do metrics across a tranche of user responses the method of how the data is stored, that can get tricky to extract. ie of the 100 users who took the survey 40% answered False to question 4.
Søren Dyhr Posted April 23, 2024 Posted April 23, 2024 (edited) 7 minutes ago, Bob Von Scio said: functionality and it can't be offloaded to another application You could put it into a web viewer! See if you can Google translate this: https://www.filemakerbloggen.se/post/google-forms-och-filemaker (BTW it's in swedish if the auto detection fails) --sd Edited April 23, 2024 by Søren Dyhr
Newbies Bob Von Scio Posted April 23, 2024 Author Newbies Posted April 23, 2024 OceanWest, thank you. I'll try that tomorrow. I appreciate the time and thoughtfulness of the responses
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now