February 20, 200322 yr I have a form (CY 104 Form) that gets sent to the local police department. On the form, it has a list of the Child's name/info, the Mother's name/info, the Father's name/info, and the Perpetrator's name/info. These fields will be automatically filled in by this script that I'm attempting to create. The information comes from a 'significant other' database that is filled out and includes the victim's mother/father/brother/sister/perpetrator/etc. I want to have either checkboxes or a dropdown (or a combination of both) in the significant other records to display the relationship of the sig other to the victim. If I used a dropdown, I'd also have to have a checkbox for if the person is also the perpetrator of the case. So, these people will be a mother/father/sibling and possibly even the perpetrator. I'm assuming I'll need some sort of loop to take whichever sig. others are related to the victim, and assign the information onto the form. How easy is this to do, I need help. Thanks!
February 20, 200322 yr Have you thought about doing this via relationships and a line items file? you could have a CY104 file that held info specific to the form, and a CY104LineItem file that held people associated with the form sharing the same FormID#. You could export name info form significant other file to line item file, child info from child file to lineitem file, and perp info from perpfile to line item file, sort them and print as subsummary report (by title "perp, sig other, child" and then include relevant CY104 info in the header or footer as related fields to CY104 file. Essentially, modeling the whole thing as an invoice. If you want to stick with the script idea, a series of if statements could do the job if you had specific perp, sig other fields you needed populated: you would want a many to one relationship first (globalCY104ID in SigOthers file related to CY104ID) set globalCY104ID to the ID of the Form you are working on. find your set of relevant records, go to rec req/first loop if [title="perp"] set field (globalCY104ID::PerpName, Name) end if if [title = "father"] set field (globalCY104ID::fatherNAme, Name) end if... go to rec/req next (exit after last) end Loop hth -Raz
February 21, 200322 yr Author Thanks for the reply. I will probably go with the script idea because (I should have mentioned this before) the form always has JUST the victim (Child), mother, father, and perp info. No more, no less. So there could be many significant others that never get included on the CY 104 form. I'm going to give it a shot and see what I get. Thanks again!
February 28, 200322 yr Author I don't think so, I look in the record after the script has run and there's nothing. I tried to even put in a few 'message boxes' to display the contents of fields in the loop and outside, I get nothing when I run the script.
February 28, 200322 yr The Loop part of your script needs to run as an external script in the SigOther database.
February 28, 200322 yr Make a Pause script after 5th line. If the global isn't populated, then check you relationship.
March 6, 200322 yr Author Sorry I haven't touched this thread for a while. I didn't realise that I needed to run the loop part in the sig other database. I have it running from there now and it works like a charm! Thanks for your help, gentleman!
Create an account or sign in to comment