Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

I am sure this shouldn't be too hard but I can't fully get the gist of your question. If you could provide more clarity then you will get the answer you are looking for.

Pete

  • Author

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

Hi Mark

I am sure you are being clear, maybe I am missing the crux.

What is Name_F. As this a new user their name will not be in the groups database yet. Right?

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

  • Author

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 =]

  • Author

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

  • Author

I'm stuck now. I just cant figure out how to set a field in one database, using a field from another. frown.gif

just have a look at the yellow layouts in the 3 files.

You will easily see the problem of duplicate records when using an external join file (membershp)

users_groups_members.zip

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.