June 27, 201213 yr 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
June 27, 201213 yr 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. :^]
June 27, 201213 yr 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
July 3, 201213 yr 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
July 3, 201213 yr 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.
July 4, 201213 yr 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