Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About andersmnystrom

  • Rank

FileMaker Experience

  • Skill Level
  • FM Application

Platform Environment

  • OS Platform
  • OS Version
    Sierra 10.13.6

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Sure but I cant get it to upload. Going to try again a little later or try to send it to you via pm. But in practice, I think it works as one to many relationships but that the relationship graph shows it wrong for some reason. It became this way when I started to use FileMaker 17 and then the same in 18. If I open the same file in FileMaker 16, everything looks right.... Big thanks for your demo file! Looked at it a bit now and it seems to work just as I wanted it. Going test it in my file now.
  2. Thanks! i will look at the demo tonight. That's what is so strange. The parent Id fields are set as unique and Im using Get ( UUID ) as auto-enter but still it looks like many to many in the relational graph.
  3. I'm learning JSON to collect data into a java graph. The reason is that I want to show the answers to a survey question in a line chart. The table structure looks like this: (I do not know why the graph shows the relationships as many to many, they are not, but it is actually one to many. If anyone knows why it is like this then please tell..) I have a list view based on the responses table. I want the graph to show the requested result in the list view. The results are always from one question but the question is asked three times a day (in three different surveys) so there are three lines per date. The fields in the list view that I would like to collect in a JSON are SurveyMoment::date (date) Svara » Survey::name (text) Responses::answer (number) I would like a graph showing three lines where each line shows the answers from the different surveys. Currently, my script that creates JSON looks like this: The calculation in the Set Variable on row 7 is this: JSONSetElement ( $theArray ; "[" & $index & "]" ; JSONSetElement ( "" ; ["date" ; Responses::date; JSONString ] ; ["answer" ; Responses::answer; JSONNumber] ; ["survey" ; Svara » Survey::name; JSONString] ) ; JSONObject ) Which results in a JSON that looks like this: [ { "answer" : 3, "date" : "2019-10-07", "survey" : "Survey 1 morning" }, { "answer" : 3, "date" : "2019-10-07", "survey" : "Survey 2 lunch” }, { "answer" : 2, "date" : "2019-10-07", "survey" : "Survey 3 evening" }, { "answer" : 1, "date" : "2019-10-08", "survey" : " Survey 1 morning " }, { "answer" : 2, "date" : "2019-10-08", "survey" : "Survey 2 lunch" }, { "answer" : 2, "date" : "2019-10-08", "survey" : "Survey 3 evening" }, etc….. ] This works if I constrain the result so that it only shows answers from one survey. But if I want three lines in the graph then JSON would have to look like the following. [ { "date" : "2019-10-07", "survey 1 morning" : 3, "survey 2 lunch" : 3, "survey 3 evening" : 2 }, { "date" : "2019-10-08, "survey 1 morning" : 1, "survey 2 lunch" : 2, "survey 3 evening" : 2 }, etc….. ] Anyone know how to create it based on the found set in the list layout based on the Responses-table? The idea is that I can filter the found set by choosing the question I want to see the answers from and choosing the time period. So, every time the found set is updated, the chart should be updated automatically and only show the answers from the found set. Thanks!
  4. In a hobby solution I work on, one part is a reoccurring medicine-event where one or more medications should be checked as "Done" in conjunction with the medicine being taken. Finally, you should check the medicine event "Done" as a whole. I would like that this last part was done automatically when you have checked/taken all medications in that event. The basic structure is an Event-table and an Object (medicine) table with a join table in between. A row in the event table is a medication event and one or more medications are added to the event via the join table. A field in the joint table is called “Done”, it is a boolean field where 0 = not done and 1 = done. There is a similar field in the event table that shows if the medicine event as a whole is complete or not. The layout for the event shows the medications to be taken in a portal and you check that you have taken the medication by going through the medications in the portal and pressing a button for each one that changes the boolean field in the joint table to a 1. I would like the boolean field in the event table to automatically change to a 1 when you have checked all the medications for the event but can't figure out how to do this. Alternatively, that a hidden button becomes visible on the layout when you have checked all the medications for the event. Then you can check the event by pressing that button. I hope this makes sense, ask me otherwise.
  5. Thanks for your reply! I think I have arranged how questions are created and answered so now I concentrate on how the answers should be aggregated, presented and analysed. I am reading about and trying to learn SQL, the web-viewer and java-charting as I find the built-in chart-function to be somewhat restrictive.
  6. Not that I have any right to expect an answer here but I was still a bit curious if you had time to check the file and if you had any input?
  7. I'm not entirely clear on how the information will be used, but I imagine that you should be able to follow the selected answers on a line chart over time together with a trend line, perhaps on a dashboard. Another part of the app will track all medicine and food that patients gets. It would be interesting if you could see any changes in the perceived health/mood adjacent to changes of the medication or diet. Or conversely, if you see shifts in the patient's perceived health/mood, one could examine if, before that, any changes were made to the medication, diet or otherwise.
  8. Thank you! I will keep this structure the with your suggested changes. Im very greatfull for all the input you can give me!
  9. Since the file contains quite a lot of sensitive information about a person, I do not want to post it all. But I removed everything except the survey-function and attached it here. Since this part is completely under development, it does not contain any actual data. The questions are, for example, only random simplifications etc. When answering the questions in the original file, you press a button bar with three buttons in it (Morg = morning, Midd = mid-day, Evening = evening). The button bar is there placed in a type of calendar layout, but here I have moved it to the layout “Create / administer Surveys”. The buttons are formatted in a way that should show if you answered one of the surveys or not but I’m unsure if it works now that I moved them. The language of the file is really Swedish but I have tried to translate what is important to English. Survey_part.fmp12
  10. Thank you for your answers. Some of the writing goes over my head, but I try to take in as much as I can. Perhaps I should mention that this is a "hobby project" where I try to make this app for a friend whose child is multi severely multi-disabled. Hopefully it will support them when they take care for her. I feel that the most important thing regarding this function is to get as much useful data as possible that then can be aggregated, analysed and followed up in different ways. That is, like you first mention in the top of your answer. Do I have a good basic structure for it now or is it something that should be changed or added? I'm a little unsure what you mean by "Survey Template Structure". Currently, one answer the questions on a layout based on the SurveyMoment table. It is controlled by a script that has Survey_ID as a parameter. The script then creates new response in a loop where the responses gets connected to the right survey questions.
  11. I have worked some more on this and believe that the structure I have arrived at isn’t optimal. I'll try to describe the function I’m building a little more. The idea is that the patient should answer a number of questions about their health a number of times a day. How many times a day and the number of questions should be possible to vary. An example: A patient should answer a couple of questions three times a day. Once in the morning, once in the middle of the day and once in the evening. Some questions will be used on each occasion, while some questions are used one or two times per day. Simplified examples of the questions are 1. How does the stomach feel (answer 1-10 where 1 = Very bad and 10 = Very good). This question is asked both morning, mid-day and evening 2. How have you slept this night? (answer 1-10 where 1 = Very bad and 10 = Very good). This question is asked every morning. However, I am afraid that I have made the structure overly complicated. I attach a picture of the tables that are included in the function and how they are connected. The tables are as follows: Questions: one record is a question. It also includes fields as “Type of question” etc. Survey: my idea is that a survey is a collection of a number of questions. It contains fields as “Description” and “Type of survey”. A question should be able to belong to different surveys. SurveyQuestions: acts as a join table between questions and a survey. Answer: one record is an answer to a survey question SurveyMoment: a record here represents the time that a survey and its questions is answered, i.e. when the answers are given. Everything feels exaggerated as said. Is there anyone who has a suggestion for a better solution. Right now, I feel that the SurveyMoment-table is completely unnecessary. The original idea was to be able to tie all the answers to a survey to the same exact time, but it can be solved in other ways. It feels like my head does not work at the moment so I appreciate all the help and tips you can give me!
  12. I am in the process of creating an app that will be a support for assistants to severely ill patients. The handling of medication, food, etc. One function should be the opportunity to track how the user is feeling and different health indicators. The idea is that one or more times per day you will enter how the person is feeling on a scale of 1-5 or 1-10. What one chooses to track should be able to vary from user to user. It can be things like sleep, stomach functions, epileptic seizures, etc. The idea is also that one should be able to follow the development of these indicators in some form of dashboard. How would you structure a function like this? I have come a bit on my way with other part of the app, but when it comes to this part, it stands completely still for some reason. English is not my first language so I hope it is possible to understand what I mean, if not, please ask!
  • Create New...

Important Information

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