Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5858 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am trying to create a survey using a visual analog scale, where the person doing the survey, answers a question by selecting a point anywhere along a 100mm line. If the start of the line is selected it should return the value 0, and at the end 100. Any point along the line any value b/w 0 and 100. Multiple radiobuttons is limited by the number that can be squeezed in, and is not a true visual analog scale. A slider like a volume bar or scroll bar may work?? Anyone know a way to solve this problem?

Posted

There are no slider features in FileMaker that you can add to the layout. However, perhaps you can do something like this.

ScoreIndicator.zip

Posted

Thanks a lot John

That is brilliant!! Just what I was looking for.

One possible change to make it perfect??

How would I adjust the programming so that when a point along the line is selected, only a single blue square is filled rather than from zero upto that point? Cheers

Posted

Change the display calc to be "=" rather than "≤"

Posted

Problem with multiple indicators!!

While adding the indicator to multiple survey questions, I have found that the setscore script can only set the score for the field allocated to it. I hope to be able to set a new score to a different field related to each question.

I thought I could make the score field a variable which I set within the script, however I don't have a way of setting this variable as all I am clicking on is a Dummybutton that can only pass the scriptparameter which is it's own number (from 1-100)?? Any thoughts on how I can set this up for multiple questions? Do I need to write a new script for each question setting the score field in each??

Hope this makes sense?!! Thanks

Posted

Each question and user's answer should really be its own record.

You will probably want to take a look at this thread.

http://www.fmforums.com/forum/showtopic.php?tid/183639/

Posted

Thanks John

I have added my database as is. I have only started creating the surveys and not yet added any details for each user.

Am I going about it the wrong way? Are portals the only way to go. The problem is that the format of some questions change within the survey and also, there are occasionally check boxes that remove the need to answer certain questions??

Might be in over my head!! :

VAS_template_adding_score_indicator_Copy.zip

Posted

I have a similar problem - but the next step.

I have multiple survey questions. IF a user chooses "N/A" then I do not want that question to be in the count of valid answers.

My value list is, right now, all numeric, with N/A as the last item (over 300 questions). However, the count function for a set of, say, 5 questions, returns 5 regardless of the answer.

How can I count only questions where the the response is NOT N/A??

I have this working, in what has got to be a far more difficult, and inelegant way - another 300 fields with just N/A as the option, that SET FIELD "" on the value list question. It appears visually to the user as one question set. Painful, but workable.

Posted

I have been able to exclude certain answers using a check box and an If() function in my calculation fields. See Question 5 and Question 18 in my mohtadi example.

Maybe this is what you want to do?

Posted

Yes - kinda. The N/A box (wish it could be a radio button to look like all the other survey response options) is what I am [painfully] doing now.

To go along with it, when N/A is selected, I clear the survey response for this question. If they change their mind, I clear the N/A when a valid survey response is entered. This is something that the radio button approach would solve instantly, if I could figure out the "exclude N/A from count" for averaging a set of valid questions.

This takes (as best I can figure out), 3 fields - the question, the N/A, and a calc field that changes state (toggle) on the most recent selection, whether it is in the question or the N/A field.

However, with nearly 300 questions, and over 25 different value lists, this makes a table occurrence of nearly 900 fields! (one, the question response, 2, the N/A, and 3, the toggle calc field). This is getting a bit unwieldy - suggestions??

The questions do not lend themselves to being in a TO separate from the answers, as there are calculations of related topics within a single survey response, and different value lists for different question sets. A given set of questions go on a given layout tab object with the explanation of the context for the questions. Many questions are different ways of asking the same question, to ensure validity of response; hence the math on aggregating various sets of questions.

The simplest way would be if one could figure out how to exclude an N/A response from a value list from the count of a set of questions, so that averages would be only for valid responses.

Posted

I dont quite follow what you are doing. Why 900 fields? You should be able to just use a summary field on your score field and it should give you the average for the found set.

Exclude_NA.zip

Posted

Maybe my own limited knowledge (read: ignorance).

The 300 questions are in one table. The found set is 1 record for a single survey. The average calculations are for up to 5 fields from various layouts, if the fields have a response other than N/A.

A single value list with one of the selections as N/A works, until I attempt to calculate the count of these 5 fields minus those that have an N/A response.

The [painful] working approach that I came up with is a SECOND field / value list, associated with each question, that only have a N/A checkbox. If N/A is checked, the 3rd field (calc) toggles, and the FIRST value list is blanked. If a value is selected, and N/A is selected, N/A clears. The 3rd field is required as a 2 field calculation gives me a "catch-22" where each calculation cancels the other, and no data can be entered.

SO, for each question field, there is an N/A field, and a TOGGLE calc field.

Structuring a table with a single question field did not make sense (to me, anyway), as I could not figure out how to get specific questions on a specific layout, and how to use a different value list for question 1, and a different one for question 2, with a edit field for question 3, etc. etc. etc., when all the questions are a single field in a table - you get the drift.

The result is 300 question fields, 300 N/A and 300 toggle calc fields. I have got to be missing something fundamental here. Figuring out the calc for a single value list, excluding the N/A from the average calc denominator would be ideal, but I have yet to figure it out.

Posted

You are confusing data structure with user interface. Post a copy of your file.

Posted

I don't think I am confusing UI with data structure.

The structure is all question fields in one table occurrence.

The alternative of one question per record, is not feasible, as there are 25 set of value list responses, with some value lists for 1 question, and some value lists for as many as 90. All the examples shown depict portals with consistent value list representations across all questions. My data set does not support this approach in any way I can think of. Record 1, 34, 65, 139, and 318, all use the same value list, and need to be grouped in one layout for user comprehension and other factors. (this is the USER interaction context I was referring to, not the layout context).

Let's get one answer at a time: Is there a way to exclude the N/A response from a value list of 1,2,3,4,5,N/A used in multiple fields for a count of non N/A responses, used as a denominator in the average calculation for this same set of fields.

field 1, 34, 65, 139, and 318

-------------------------

# of above field with a 1-5 in the response

If there is a way to accomplish this, a single radio button value list would work. The separate N/A response field and a toggle field to manage the radio button behavior would not be needed - or maybe there is another approach that would be easier that 300 question fields, 300 N/A fields and 300 toggle calc fields, if the above math question cannot be accomplished.

I can't post the file, do to contract restrictions and the proprietary nature of the content. I'd have to obfuscate the content. It would be quicker to produce a small example file.

Posted

The structure is all question fields in one table occurrence.

And this is exactly where your structure is wrong, 3 TO's at least should be involved to facilitate this as something that resembles a relational structure. Each question should be it's own record and similar goes the replies. Summaries are designed to deal with "records" not fields - sorry but you lean against the wrong metaphor, this isn't a spreadsheet!

The most healthy structure I've come across is this:

http://www.fmforums.com/forum/showpost.php?post/149069/

Tying different value list to each portal row is next to nothing we have had dynamic valuelists ever since fm5.

But I agree - I would be nice to see why it isn't feasible in your case ...upload a template!

--sd

Posted

I agree with John and Søren.

The alternative of one question per record, is not feasible, as there are 25 set of value list responses

This can be handled by associating each question with a question type (relationships again!), with permissible responses indicated for each type.

All the examples shown depict portals with consistent value list representations across all questions

See here for some that don't:

http://www.fmforums.com/forum/showtopic.php?tid/186050/

Posted

OK, I restructured the database, and have the portals working for the questions that have a consistent value list (including an answers table).

However, what was easy, now appears hard. I have 4 layouts (OK, 1 layout, 4 tabs) where each has a set of questions. The first migt be a fill in the black, the second, a popup from a defined list, the 3rd, a set of vertical radio buttons, the 4th, a checklist horizontally.

HOW?? do I get the questions from the question table, into the layouts, where each must, by immutable layout design, is a different height? (Portal row 1, 12 point, row 2, 48 points with a radio button list, row 3 12 points with a value list.

I would guess that a single portal is just not going to do this. But how do I get record 5 to show up in a specific position on the layout AND make a record answer in another table correspond to that question? All the automatic referential goodies of a portal disappear. Do I need 5 portals, with 5 sets of table occurrences, each with a different match field, just to get 5 questions placed on a layout?

The consensus seemed to be that a single record with all 300 question fields (responses) for a single survey, was the wrong way to go. Now I am not so sure, although I only have about 25 of these questions left to deal with across 4 tabs - the ones that had the same response structure across all records in a layout was quick and easy.

Stuck again - gotta stop doing these 14+ hours days - the brain goes dead about this time of day.....

Posted

A portal with multiple rows will show the same elements in each row. You can have different values show up in a checkbox field in each row - but you cannot have the field formatted as radio buttons in one of the rows. Similarly, all portal rows will have the same dimensions.

What you can do is to have several portals of one row each, each showing a different row. Then you can format each portal independently any way you like.

The consensus seemed to be that a single record with all 300 question fields (responses) for a single survey, was the wrong way to go. Now I am not so sure

It does mean a bit more work on the UI (perhaps more than a bit in your case). But it's nothing compared to the amount of work it would take to get meaningful results out of a flat-table survey.

Posted

This has gotten a little off topic from Slider scale issues....

So I guess the approach at this point would be to create a TO for each of the remaining questions, and a match field so it can allocate the right question from the questions table to its proper portal? Now I'll have more match fields and TOs than I did # of fields in the prior approach - oh well, the price for increased flexibility.

I a thinking I should break the tab metaphor into separate layouts (still look the same), so that I could have multiple TOG squids with heads tied to layouts; if nothing else, for ER readability and maintainability down the road.;)

I have near zero flexibility in the layout question order or groupings - thousands of psychological research hours and published studies went into that part, so I am stuck with key aspects of presentation pre-defined.

Posted

I am stuck with key aspects of presentation pre-defined.

It's difficult to advise without knowing what these predefined aspects are. Is there at least some consistency here? I vaguely understand these questions are presented in groups. But how many different group layouts are there?

I guess the approach at this point would be to create a TO for each of the remaining questions

I don't think that's necessary. I am mostly guessing here, but I get the impression you need to assign each question to a group. Then you can "page" through the groups, and each question will fall into its designated row. This way, each row can be shown in a separate portal and formatted differently - but all portals are based on the same relationship, showing records from the same TO.

Posted

Each question has a layout assignment, and object assignment (named tabs), and a sequence ID within that.

Example: 1st layout tab object; the ...

1st question is EDIT box

2nd question is pre-defined value list

3rd question is a vertically oriented checkbox set (multiple selection)

4th question is a radio button (mutually exclusive selection) set, laid out horizontally

5th & 6th are EDIT boxes

7th is a relational value list

Every tab is different ......

Posted

Not sure I understand the "page" through the groups, and each question will fall into its designated row. This way, each row can be shown in a separate portal and formatted differently - but all portals are based on the same relationship, showing records from the same TO. "

My understanding is that to get a portal to show a limited record set, the associated TO needs to somehow be restricted to that. A matchfield to the group define field in a related TO, gets to that result. Is there a better way??

Posted

Take a look at the attached example. It pages through related records in groups of 3. Each record is shown in a different way, according to its position within the group.

Note that the same script that switches the viewed group could also change the layout/tab panel at the same time - so eventually, if so desired, each child record could have its own formatting in the matrix of layouts x groups.

ScrollGroups.fp7.zip

Posted

It Works! (mostly). In 20 years of Filemaker (or maybe something I forgot in the long unused-time gap between 5.5 and 9 ;) ), I had never used multiple instances of the same portal, with a different start record defined for each. Neat stuff!

Now the only real issue is the blank fields from the answer TO, displays text that is not the right text for the field - until you click in it. Then the defined entry method overrides.

This has got to be something obvious I am (again) missing. This getting back up to speed is a bear!

Posted

Now the only real issue is the blank fields from the answer TO, displays text that is not the right text for the field - until you click in it.

I am not sure I understand what you mean (you assume we know things about your implementation that you haven't told us), but it sounds like a refresh issue, following a change of view. If this is scripted, include a Refresh Window [Flush cached join results] step at the end of your script.

Posted

Restructured it to a table with one question per record. The complexity seems to be up a hundredfold over the one survey/all questions in one record structure. (and that was still relational, for agency, client, counselors, and evaluators).

In order to set up input layouts, (based on every sample I looked at) I leveraged used self join table, with questions self joined to questions to answers. In my case, as each set of questions was to be specific to a layout and the explanatory text on a layout, it took 18 question TOs (one per layout tab) to map the matchfields to a particular layout (I guess I could have just used a single TO for questions, and started the portal row on the question sequence for that layout, but deleting one question would ripple through every portal). The answer TOs are children to each of the question TOs per layout.

This is workable (even if I have 10X more time into what was a virtually finished product, minus one calculation), but now I need to produce a report detailing out the same information input. However, with not all questions are answered, so it looks like another set of 40+ TOs to produce the report, complex layouts, multiple portals per page, and I don't know how to match a question ID with layout position!, at least with non-sequential records (gaps in sequence).

Placing fields on a layout is easy. Placing a field on a layout, and expecting one specific record of 5000 to show up in the right place, is, at least from my struggles, not so easy. To add to the problem, attempting to ascertain if the right answer value is displayed in the right place, is a good bit of work as well.

In addition, when the answer to one question is N/A, I need to zero out 5 other records - no buttons or triggers allowed, just field entry. This was easy across fields in a single record.

It seemed to be the consensus opinion to make one question per record, instead of one survey per record, but I am not sure. What am I missing??

Posted

it took 18 question TOs (one per layout tab) to map the matchfields to a particular layout

This is approximately where you lost me. Very early in this thread, John said:

You are confusing data structure with user interface.

I am getting the same feeling.

Posted

There are some 18 tabs in 3 layouts.

I need SPECIFIC questions to be on each of these tabs, as the action description text is hard coded on a layout. Not scrollable, not variable - Question 1-6 MUST be on layout 1 tab 1.

Questions may roll off the list. If question 9 goes away, the question 63 must still remain on the appropriate layout.

The question DB fields include one for layout where it is to appear, and named object (TAB) that it is to appear on.

The only way I could figure to do this is to create match fields to TOs so that a specific TO would include just the records that need to be associated with that layout.

AND, as the answers had various input methods (edit, value list, check box, radio button) within a single layout, then the only way I could see to do this was to place multiple instances of the same portal on a layout, with a different starting record, so that I could vary the input method. (from a example provided)

Is this "confusing" ER with Layout - maybe, but tell me there is a better way, and I'll jump on it.

A single question TO parent / answer TO child setup would work, as long as the number of questions remained the same. But deleting one would ripple through all the tabs; the current approach only impacts a single layout object.

The original way was a single record per survey, with each field within the record showing up on a particular layout. I ran into problems when I had to calculate across fields with having to omit fields from the calculation based on field content.

Every bit of feedback said that this flat file (some called it a spreadsheet mentality) approach was wrong, so this is where I am at .....

Posted

I think that in order to keep each question fixed to a specified portal row, regardless of other questions, you need a Slots table in-between. Examples of this can be found here:

http://www.fmforums.com/forum/showtopic.php?tid/176396

Be warned that this is not a simple method, so be prepared to spend some time with it.

Every bit of feedback said that this flat file (some called it a spreadsheet mentality) approach was wrong

Every feedback said a flat file approach was wrong, because you came into this thread asking how to "count only questions where the the response is NOT N/A". If you can figure out an easy way to do this using "a record per survey, with nearly 300 fields for answers", I would be interested in learning it.

Since you have received the answer to your first question, this thread is revolving around presentation issues. Presentation issues are the most difficult ones to advise on remotely, because one needs to get a feel of the intended workflow. It's much more difficult with so little information given out - not even a sample file.

It's quite possible that in some circumstances a flat file would make more sense as a PRESENTATION MODULE, i.e. that the user would fill a flat-file form, which would then be imported into the "real" database as separate records. I don't know whether this is such case or not. I certainly don't see how one would omit certain questions from the list in a flat file.

Posted

I have not tried this yet, as I was already down the path of one question per record, but another suggestion (kjoe - thanks!) was the following for dealing with the calculation with the N/A issue ..... If I am reading this right, as all other fields would return a numeric value, the N/A would be excluded from the denominator count in the calculation.

sum ( field1 ; field2 ; field3 ; field4 ; field5)

/

count ( getasnumber ( field1 ) ; getasnumber ( field2 ); getasnumber ( field3 ) ; getasnumber ( field4 ) ; getasnumber ( field5 ) )

Except for educational purposes, I don't know that this matters, as I am already well down the alternative path, assuming I can make the rest work ;)-/.

Posted

I believe Average ( field1 ; field2 ; field3 ; field4 ; field5 ) would return the same result, with a little less effort. Still, typing a list of 300 fields for every single stat...

But that's not the point. Try to get a report like this from a flat table:


Question 1:

• Males:

	Yes: 52%

	No: 39%

• Females:

	Yes: 44%

	No: 51%	

Total Population:

	Yes: 47%

	No: 46%

	

Question 2:

...

Anyway, I am not about to engage in a roundabout cross-forum discussion (say hello to kjoe).

Posted

I have not tried this yet, as I was already down the path of one question per record, but another suggestion (kjoe - thanks!) was the following for dealing with the calculation with the N/A issue ..... If I am reading this right, as all other fields would return a numeric value, the N/A would be excluded from the denominator count in the calculation.

That was what was in my sample file earlier. Since the summary field or sum () calc field returns a numeric value, the fields with the "N/A" text value would not count towards the total of the numbers.

Posted

Yes, I can see the benefits - hence all the work to covert over. John, sorry if I did not see the details in the sample you provided - I looked at so many.

I'm gonna try script populating blanks in every record for a single survey, then having the user overwrite each record. This way, I can be assured of 100% of the records for a single survey to be populated, regardless of user input - or lack thereof.

This way, I am hoping that my reporting can be built from the answers without gaps that would put the wrong thing in the wrong place.

This topic is 5858 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.