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

Hi, I have a database of about 20,000 leads. I need to assign 1000 to user 1, 1000 to user 2, 1000 to user 3 ect.

Can I script this?

Thanks

Ian

Sure but can you provide more details? Random records? What is the purpose here.

Hi Ian,

More details would be necessary. ,

* Do you have a Staff table with a unique StaffID?

* Do you want all unassigned leads to be assigned even if over 20,000?

* Do you want to be able to specify the number each Staff is assigned?

An easy way is to use the Staff value list to a variable and then loop the variable while looping through the record set. It might look something like this (pseudo-script):

Go to layout [ layout based upon leads table ]

Enter find mode [ uncheck pause ]

Set field [ Leads:StaffID ; "=" ]

Set error capture [ On ]

Perform find [ ]

If [ not Get ( FoundCount ) ]

Go to layout [ original layout ]

Show custom dialog [ "no unassigned leads found" ]

Exit script

End if

#. Records found so loop them

Set variable [ $list ; ValueListItems ( Get ( FileName ) ; "Staff" ) ]

Set variable [ $count ; ValueCount ( $list ) ]

Loop

Set variable [ $num ; Case ( not $num or $num >= $count ; 1 ; $num + 1

Set field [ Leads:StaffID ; GetValue [ $list ; $num ]

Go to record/request/page [ next ; exit after last ]

End loop

LOL, I was typing on my iPad and I didn't have my wireless apple keyboard and this on-board keyboard is slow to use!

Hi John! Also posting from iPad, I get no text formatting options nor do I get emoticons. :^]

  • Author

Hi, guys many thanks for replies.

There is one database which holds all the records. The boss wants to assign say 1000 to Bill in no particular order so Bill can work through them.

Then he will assign 1000 to John and so on.

Bill will login with his username and only see the records assighned to him. does this help?

Ian

  • Author

Hi Guys.

I have a database with about 20,000 records. I want to assign 1000 records to Ben so he can work through them, 1000 to sam, 1000 to john ect.

There user names are in a table.

Can I script this?

Thanks

Ian

Yes. The Replace command might make it easier for you.

  • Author

Can you be a bit more specific?

Thanks

Ian

Make a new text field called "Staff" say. Find the records to be assigned to Alex. Click in the Staff field, type the staff name, issue the Replace command to put the same name in all the found records. Rinse and repeat.

There is one database which holds all the records. The boss wants to assign say 1000 to Bill in no particular order so Bill can work through them.

Then he will assign 1000 to John and so on.

If you can put together a return-separated list of staff's usernames, say in a variable, you can then replace the contents of the Staff field with the following calculation =

GetValue ( $listOfStaffUsernames ; Div ( Get ( RecordNumber ) - 1 ; 1000 ) + 1 )

This will assign the first block of 1k records to the first username on the list, and so on. Note that with 20k records, you will need 20 usernames.

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.