Dynamic Record Position

Discussions about CSEntry
Post Reply
CMH
Posts: 31
Joined: April 1st, 2022, 1:54 am

Dynamic Record Position

Post by CMH »

Hi CSpro Team

In my CAPI application there are around 50 records. Kindly consider names as “record 1” to “record 50” which are set in ascending order in CAPI application. In ID field, I put a single response item/question (named CL5) and based upon response to this question, 5-6 records (out of total 50) become applicable and rest get skipped. For this, I am using preproc logic at record level. Logic works like example given below.
• Response value 1 in CL5: then record 1 to record 6 will appear
• Response value 2 in CL5: then record 7 to record 13 will appear
• Response value 3 in CL5: then record 14 to record 18 will appear
• and so on till response value 12.
In some case like when response value in CL5 is 3, 7, or 8, I also need to capture data for “record 2” along with respective records (like record 14-18 in case response value 3 is selected). However, for such situation record 2 should come after record 14.
Appreciated, if someone please guide in this regard.
justinlakier
Posts: 152
Joined: November 21st, 2022, 4:41 pm

Re: Dynamic Record Position

Post by justinlakier »

Hi,

If you want records to appear in a different order than listed, you can use Move or Reenter in 14's postproc to go backwards to record 2, and a skip in 2's postproc to get yourself back to record 15 and continue linearly. If so, you'll need to make an exception in the skip in record 2's preproc so that you can initially skip over it but access it fine later.

Hope that helps,
Justin La Kier
CMH
Posts: 31
Joined: April 1st, 2022, 1:54 am

Re: Dynamic Record Position

Post by CMH »

Thank you very much.

I tried it. However, received error (91187) i.e., Unable to 'reenter CL1B1' - target-item field is a never-keyed field {in Var CL2A12 PostProc}

where

CL1B1 is first item of "record 2" and CL2A12 is last item of "record 14".

This might because of logic (explained in my initial post) i added to select a specific set of records and skip rest - that i can not avoide. Otherwise suggested solution would have been very helpful. Appriciated.

Any other solution please?? Thanks for the help.
CMH
Posts: 31
Joined: April 1st, 2022, 1:54 am

Re: Dynamic Record Position

Post by CMH »

Someone please help about the matter mentioned in my this post. Thanks
vgonzalez
Posts: 27
Joined: March 12th, 2020, 4:19 pm
Location: VENEZUELA

Re: Dynamic Record Position

Post by vgonzalez »

Most of the incidents when trying to move between the items from the same or different rosters are mainly due to the validation configuration that the capture controls have or due to the logic developed that controls the jumps between the items of each items or records in rosters, remember that the PREPROC and POSTPROC are only useful when you have a forward scroll in your capture form, in case of going back or scrolling between the items forward or backward you must do the logic in the ONFOCUS or KILLFOCUS sections and manage the options according to the functions that you use for jumps:

ASK IF
https://www.csprousers.org/help/CSPro/a ... ement.html

SKIP
https://www.csprousers.org/help/CSPro/s ... ement.html

MOVE
https://www.csprousers.org/help/CSPro/m ... ement.html

and ADVANCE.
https://www.csprousers.org/help/CSPro/a ... ement.html

However, definitely for greater understanding and support from the community, I recommend that you share the logic directly with the @csrpro development team by mail or a simple example that you share here, in order to understand it in greater detail and thus be able to help you any of the community of experts
CMH
Posts: 31
Joined: April 1st, 2022, 1:54 am

Re: Dynamic Record Position

Post by CMH »

Thank you very much for detailed response.
May I know the mail ID of relevant person of CSPro development team. Thanks
vgonzalez
Posts: 27
Joined: March 12th, 2020, 4:19 pm
Location: VENEZUELA

Re: Dynamic Record Position

Post by vgonzalez »

You can find the mailing list in the CSPro help menu, as shown in the image...

CSPro_HelpMenu.jpg
CSPro_HelpMenu.jpg (227.14 KiB) Viewed 4296 times
This team that is identified in the image, is the main and official support of CSPro, and the rest of us are part of the community that we use, give assistance, promote or train new developers in our countries or in some cases other countries or regions from consultancies, technical assistance or inter-institutional cooperation between national statistics offices, ministries or other public and/or private institutions.

In any case or for more details you can write to my personal email victor.alfredo.gonzalez@gmail.com, so I can write to you in case you need any other additional reference to those previously indicated.
Post Reply