December 4, 201213 yr I have a database with thousand of records. The users are held in a value list called userID. I user this script to assign records to users. Go to layout [ "Data" (Main data)] Enter find mode [ ] Set field [ Main Data::Assigned_to "=" ] 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 ) ; "userID" ) ] Set variable [ $count ; ValueCount ( $list ) ] Loop Set variable [ $num ; Case ( not $num or $num >= $count ; 1 ; $num + 1 Set field [ Main Data::Assigned_to ; GetValue [ $list ; $num ] Go to record/request/page [ next ; exit after last ] End loop I need to be able to pick which user to assign to and the number of records to assign. Can this be done? Many thanks.
December 5, 201213 yr ... so it looks like your script finds records with no userID, and you want to assign users to these records. Do you want the script to do the assignment automatically? If so, then you need some rules by which to assign the users. Or does the user need to provide input to decide who gets assigned to what?
December 5, 201213 yr Author Hi, I need an administrator to pick the user and the number of records. Thanks
December 12, 201213 yr You need a field (global field), where you would enter a number of first records which you'd like to assign to a user and another global field where you could choose a user GlobalUserField. And then make a script: ... ... #. Records found so loop them Go to Record/Request/Page [ First ] Loop Exit Loop If [ Get ( RecordNumber ) > GlobalNumberField ] Set field [ Main Data::Assigned_to ; GlobalUserField ] Go to Record/Request/Page [ Next ] End loop
Create an account or sign in to comment