Jump to content

Set Field Name by variable


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

Recommended Posts

I have flag fields for types of student financial aid

Students::Pellgrant

Students::Staffordloan

Students::Plusloan

How can I write:

Set Variable [$aidtype; "Pellgrant"]

Enter Find Mode []

Set field [students::$aidtype; 1] // to find records where Students:Pellgrant = true

Perform Find []

Link to comment
Share on other sites

It would hard coded, one of five or so field sets I would find and process with one script.

I think I've found what I wanted:

Set Variable [$aidtype; Value: "pellgrant"]

Enter Find Mode[]

Set Field By Name ["Students::" & $aidtype; 1]

Perform Find []

If you think there's a neater way than looping thru five changes of this variable, I'd like to know.

Link to comment
Share on other sites

My approach would be to have a single field in Students, with an AidTypeID, and a table of AidTypes. If the Student can have more than one aid type, then you need a join table btw Students and AidTypes (storing StudentID and AidTypeID). You would find in the join table for AidTypeID and gtrr match found to Students.

You shouldn't break Aid Type into separate flag fields.

Link to comment
Share on other sites

This topic is 4772 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.