Page 1 of 1
prepopulate IDs
Posted: April 21st, 2022, 5:23 pm
by mmhill
Possible to display a listing of IDs on the screen's left side, choose one ID and have it inserted into the active form's ID field?
If not, any other way to prefill IDs on blank forms?
Thank you.
-mjh
Re: prepopulate IDs
Posted: April 21st, 2022, 6:44 pm
by aaronw
Typically we use a menu to do this. If we know the households in advance we'll create a dynamic value set to select them. Then using the PFF object and set the key property. As long as the key property is set the household application's ID items will be pre-filled when the PFF is executed.
I recommend taking a look at the CAPI census example in your documents folder. First, run it and just get a feel for how it works. Then take a look at the logic. In particular, take a look at the user-defined function LaunchHouseholdProgram and where it is called from.
dynamic value set blog post:
https://www.csprousers.org/posts/2019-0 ... bject.html
pff object helps:
https://www.csprousers.org/help/CSPro/pff.html
Re: prepopulate IDs
Posted: April 22nd, 2022, 2:13 pm
by mmhill
Thank you!
-MJH
Re: prepopulate IDs
Posted: May 9th, 2022, 11:46 am
by mmhill
Using v7.1, don't have an Examples folder. Will v6.2 Examples work as a stand-in? Thanks.
Re: prepopulate IDs
Posted: May 10th, 2022, 6:55 am
by Gregory Martin
Have you tried selecting Help -> Examples Folder in the CSPro Designer? We moved the examples to the Documents folder a few years ago (because the CSPro installation folder was read-only, which made it hard to work with the examples).
If you don't actually have it on your machine, we can send you a zip file of the contents of the examples.
Re: prepopulate IDs
Posted: May 10th, 2022, 5:13 pm
by mmhill
A zip file of the examples would be great. Please send. How do I find guidance for creating a menu for an existing program? Thanks. -MJ
Re: prepopulate IDs
Posted: May 16th, 2022, 12:41 pm
by sherrell
Unfortunately a zip file of the entire examples folder is too large to attach here. Installing 7.7 would be the easiest way. You can then find the examples in this folder: %homePath%\Documents\CSPro\Examples 7.7
Sherrell
Re: prepopulate IDs
Posted: May 17th, 2022, 7:25 am
by Gregory Martin
The CSPro helps and examples are actually public repositories on GitHub, so you can download them there. The CSPro 7.7.1 examples are here:
https://github.com/CSProDevelopment/exa ... ease/7.7.1
Click the green "Code" button and then select "Download ZIP."