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

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

Recommended Posts

Posted

I am not new to programming or scripting, but I am new to filemaker, and this script seems over my head. I am hoping someone out there will be nice enough to help me create it.

This is the basics of what it must do. The database is of Users, the other databases used are a Groups database, and a Memberships database. The script will run in the users database, and use the other 2.

In the Users database, you select what groups you belong too, then in the memberships database, i need it to create a record for each group you select. the record consists of an auto-enter number, User_Number, and Group_Number.

To further complicate things, in the user database, they select they Name_F from the groups database. I have to make the script search the Groups database, using this Name_F, to get the Group_Number.

thanks a million, I really hope someone has a kind heart, and a large brain.

--Mark

--Rush-Henrietta Central School District

--Computer Services

Posted

Yes, I applogize for the confusion. i will go in depth, even if its too in depth.

The interface is all in the User Database, the user enters a user number, all their personal information, and selects from a series of dropdown lists, what groups they belong too. When everything is filled out, they click a button that says create user.

I want to script on the button to make a record in the Memberships database for every group that that User belongs too. The 3 fields in the membership are membership_number, which is just an auto-incremented number, user_number, which is from the User database, and group_number, which is in the groups database.

When the user selects a group from the dropdown menu, it is a valuelist from the groups database. It is using the field Name_F though, not group_number. Because of this, I have to find a way to perform a find, using the Name_F, and then get the group_number from there, to use in the creation of the memberships database.

This is still realy confusing i'm sure, but it should be much more clear then my original post. If you have any specific questions, i would be glad to clear it up even more.

So far, I have a script on the button, "Create User" that opens the membership database, and runs a script, called "new record". That "new records" script is located in the memberships database, and does just that, creates a new record. I think that alot of the code will go in this script, not just the "Create User" script.

Thank you so much,

Mark

Posted

what do you need the membership database for?

you can have a user belong to multiple groups (relation users->groups, key=group ID) while group id is a textfield in users formatted as checkbox with value list of possible groups .

then have a relation back from groups to users using the same keys.

the valuelist "groups" is made from fields groupID and group Name in Database "groups".

well, have a look at the attachment ...

users_and_groups.zip

Posted

In reply to Name_F, this is used as the full name of the group. The memberships database is used to keep track of user_number and group_number pairs, but in the groups database, we use name_F to keep track of all the groups. This is simply the full name of the group. Such as Administration, or Computer Services

Secondly, that is exacty what i use the membership database for, so i suppose i dont need it. All it does is keep track of user_number/group_number pairs, to see what groups the user belongs too. Just to stop from going back and changing tons and tons of code, I think I will keep it the way I have it, unless its impossible to do this script. Thanks for the cool advice though =]

Posted

With my current scripts, i can open the Memberships database, create a new records, and have it autofill in the Membership_Number. The User_Number and Group_Number fields are very confusing to me, because you get the results from other databases. How is this done? Using relationships and similar fields?

--Mark

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