Jump to content
Sign in to follow this  
Matthew R White

Sequentially assign with loop script

Recommended Posts

Hi All,

I have a main table and a secondary table called users. They share a field called Producer number.

Within the main table, which contains thousands of customer files, each customer has an assigned producer number. Within the users table, all of our producers (9) have individual records and are numbered 1-9.

I'm looking to create a script for our new business website leads that when a new quote request email comes in, filemaker can sequentially assign web quotes based on the day. So, for example, the first quote request would go to producer 1, the script would then check how many quote requests each producer has received for the day and distribute evenly, making sure each producer gets an even number of quote requests each day.

The reason for the script to search and make sure the numbers assigned are equal, is because we can have up to 3 users entering web quotes at the same time. So as the quotes are entered, the total assigned needs to be searched and updated/checked and compared in real time.

I'm thinking some kind of loop script is the best way to accomplish this, any tips or ideas as to the best way to get this done?

I guess I can create a loop that goes to each user in the user layout, checks how many have been assigned to that user, then sorts by least assigned for the day and sets that producer number as who the quote request goes to.

Thank you!

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

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