Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7937 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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

Posted

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!

Posted

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.

Posted

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!

This topic is 7937 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.