Good evening
I need your help, I have created a survey where there is an ingredient finder but when I select the ingredient or food it always returns the same return data, I attach images.
I hope your help in this case that I have, and to obtain the expected result that is to search for the food or ingredient and when selecting the data from the additional table are assigned to the variables of the questionnaire.
I attach the compressed file.
Thank you very much in advance.
Paul Hinojosa
Error in search (selcase)
Error in search (selcase)
- Attachments
-
- 01_select.png (41.05 KiB) Viewed 11187 times
-
- 02_Load_dat.png (24.51 KiB) Viewed 11187 times
-
- R24_2.rar
- (342.15 KiB) Downloaded 499 times
-
- Posts: 1807
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Error in search (selcase)
You are allowing the multiple selection of cases:
However, my guess is that you don't want to select more than one case. If so, remove that "multiple" line and your code will work as expected.
CaseFound = selcase(TABLA_DICT, "")
where pos(strip(BUSCAR), INGREDIENTE) = 1
include(INGREDIENTE, ID_GRUPO, ID_AUP)
multiple; // <--------------
If you do that, you have to iterate over the selected cases to determine what to process: https://www.csprousers.org/help/CSPro/f ... ement.htmlwhere pos(strip(BUSCAR), INGREDIENTE) = 1
include(INGREDIENTE, ID_GRUPO, ID_AUP)
multiple; // <--------------
However, my guess is that you don't want to select more than one case. If so, remove that "multiple" line and your code will work as expected.
Re: Error in search (selcase)
Thank you very much
With the observation you indicated
I could make the modification and now the questionnaire works correctly (I attach images).
But I have a problem now that I want to run the questionnaire in Android, the selcase field does not work, the selection option is not displayed, the list that appears in the Windows version does not appear at all.
Maybe I have not uploaded a file? Or modify the data, could you help me again please.
Thanks
Paul Hinojosa
With the observation you indicated
Code: Select all
function BUSQUEDA()
CaseFound = selcase(TABLA_DICT, "")
where pos(strip(BUSCAR), INGREDIENTE) = 1
include(INGREDIENTE, ID_GRUPO, ID_AUP);
ALIMEN = INGREDIENTE;
CODIGO = ID_CODIGO;
GRUPO = ID_GRUPO;
ENERG = ID_ENERG;
PROTE = ID_PROTE;
CARBO = ID_CARBO;
GRTOT = ID_GRTOT;
GRSAT = ID_GRSAT;
GTRAN = ID_GTRAN;
AZTOT = ID_AZTOT;
AZLIB = ID_AZLIB;
SODIO = ID_SODIO;
FUENTE = ID_FUENTE;
AUP = ID_AUP;
if not CaseFound then
errmsg("No se ha seleccionado");
reenter;
exit; {- - - - - - - - - - - - - - - - - - - - - - - > }
endif;
end;
But I have a problem now that I want to run the questionnaire in Android, the selcase field does not work, the selection option is not displayed, the list that appears in the Windows version does not appear at all.
Maybe I have not uploaded a file? Or modify the data, could you help me again please.
Thanks
Paul Hinojosa
-
- Posts: 166
- Joined: November 21st, 2022, 4:41 pm
Re: Error in search (selcase)
Hello,
It seems that you're only including your .pen and .pff files in the deployment. If you want the .csdb to be present for lookup purposes, you need to add the csdb file to the deployment, not just sync the dictionary.
Hope that helps,
Justin
It seems that you're only including your .pen and .pff files in the deployment. If you want the .csdb to be present for lookup purposes, you need to add the csdb file to the deployment, not just sync the dictionary.
Hope that helps,
Justin
Re: Error in search (selcase)
Thank you very much
Indeed, when uploading the csdb file it works as expected.
Thank you very much for your help, without you I could not achieve my goals.
Regards
Indeed, when uploading the csdb file it works as expected.
Thank you very much for your help, without you I could not achieve my goals.
Regards