Good afternoon
Sorry for the delay in responding to the queries. I appreciate Sherrell's interest in helping me, now I'm going to answer your questions to have the complete picture.
Q1.
Is there a second application that runs before this? Or are you stripping down a single application to just try and show us the relevant parts? Which I appreciate, but I'm also having a hard time understanding how an analyst will make sense of all this data and be able to link up persons within a household properly.
This questionnaire has a part with sociodemographic data, for that reason I have omitted that part in this explanation and I apologize for the case, the fundamental and main part being the collection of consumption data, I understand the doubt but this questionnaire will only be applied to one person per household so there will be no problem linking consumption data.
Q2.
What happens if several people in a household (HH) eat the same prepared dish (whether or not the dish was prepared in the HH or purchased outside the HH)--are they each supposed to list all the ingredients? If so, how would a person know how that information if they did not prepare the dish? And since they will likely give different answers, the data becomes less meaningful/possibly meaningless. I was hoping a food diary was being created so that when an interviewer arrived at the HH, the interviewer could log all the common meals (and their ingredients), and HH members could chose from those items in addition to any other food items listed.
I understand the doubt, the people who prepare the food will generally be interviewed, therefore they will have knowledge of the ingredients that have been used in the preparation of the food.
If a person who has not prepared the food is interviewed, they will be asked how they would have prepared it and thus we would have some reference values. This questionnaire so far has 2 lists of queries.
The first a list of ingredients and a second list of portion sizes with which it is expected to obtain the net weight of each ingredient according to the portion.
Q3.
You need to add a check before making your selcase call to see if you're processing an "in advance" call (i.e., what resuming entry where you left off will do when you restart the app). So prior to your selcase call, you need to wrap all of that within a:
Code: Select all
if ! inAdvance() and length(strip($))=0 then
// selcase calls/other stuff
endif;
Add the collection lines and that problem was effectively solved, but if it does not find the ingredient, the fields are skipped and when returning from a partial save, some fields turn lead-colored, which we know will not be considered in the data.
And now it's back to another WEIGHT field.
- Imagen 3.PNG (31.37 KiB) Viewed 580729 times
Q4.
I'm not sure exactly what you mean here. Which data will you be copying and to where? Please cite variable names.
The data that must be repeated are those enclosed in a blue rectangle; these data are repeated for each preparation. at the end of the row ask add more ingredients? and when answering if those data from the beginning, being from the same preparation, should be repeated and then from the search variable the data changes.
This process must be done every time the preparation is changed, which as is known can be a maximum of 7 preparations.
- Imagen 4.png (34.63 KiB) Viewed 580729 times
Q5.
There is nothing named CODE1. Do you mean CODIGO1? In PROC BUSCAR1 the same selcase call is being made in the followup PROC R1P110...so I'm not sure why anything will be different on the second call. And it sounds like you're trying to go backwards (return to "CODE"1), yet I don't see any logic to support that (your application did not compile due to an incomplete logic block in PROC CODIGO1, so I don't know if you sent us the correct application, but maybe that's where this was happening?). Also in PROC BUSCAR there are a several assignments taking place after the "skip to CODIGO1;" call, but none of that logic will be executed of course due to the skip.
I am sorry for what happened, I must have confused the file when uploading, now I am sending a progress, it is not much because, as you know, given my queries I have been stuck without being able to move forward.
After I can solve the conflicts that I have had, I will move on to the second phase, which will be to do the same but for the rest of the meals, which are up to 7 maximum, and as the third phase, summarize the data in a new roster as I explained at the beginning of this post. where each row is a preparation.
Thank you very much in advance, I hope you can help me soon.