Copying Scoreboards
'Copying Scoreboards Between Access types'
First extract the scoreboard you want to copy on to a file using the following command
To run the command you need to know the accesstype code from Access_Type table
In this example 150926 is an accestype we wish to copy
<source lang="html4strict"> pdm_extract -f "Select * from User_Query WHERE obj_persid like '%1540926%'" > store </source>
The output is as follows
<source lang="html4strict">
TABLE User_Query
expanded factory id label last_mod_by last_mod_dt obj_persid parent persid
query query_set query_type sequence
{ "0" ,"" ,"400954" ,"My Queue" ,"" ,"" ,"acctyp:1540926" ,"0",
"usq:400954" ,"" ,"0" ,"" ,"100" }
{ "0" ,"cr" ,"401012" ,"Today's Tickets",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"04/18/2008 13:28:32" ,"acctyp:1540926",
"400954" ,"usq:401012" ,"my Today" ,"0" ,"0" ,"150" }
{ "0" ,"cr" ,"401013" ,"Today's Pending",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"05/12/2008 10:55:40" ,"acctyp:1540926",
"400954" ,"usq:401013" ,"my todaypend" ,"0" ,"0" ,"175" }
{ "0" ,"cr" ,"401014" ,"Today's Open" ,"E7F07AAB67A1DA469F51FB1BC30097CF",
"04/18/2008 13:31:32" ,"acctyp:1540926" ,"400954" ,"usq:401014",
"MY TODAY OPE" ,"0" ,"0" ,"187" }
{ "0" ,"cr" ,"401015" ,"Today's closed",
</source>
Use the find and replace feature to replace Acctyp: 1540926 to the desired access type number .. in our case the number is 1540922
After replacing, rename the ID and persid fields as follows <source lang="html4strict">
TABLE User_Query expanded factory idw label last_mod_by last_mod_dt obj_persid parent persidw query query_set query_type sequence </source>
This will disable the ID fields in the file so we don’t replace the original data
Use the following command to load it to the new scoreboard <source lang="html4strict">
Z:\>pdm_load -i -f store </source>
You will get the following error as the ID and persid fields are not recognizable
<source lang="html4strict">
Z:\>pdm_load -i -f store command = C:\PROGRA~1/CA/UNICEN~1\bin\dbload -i store ERROR: Invalid field name (idw) for table (User_Query). Ignoring column. ERROR: Invalid field name (persidw) for table (User_Query). Ignoring column. </source>
Now extract the data to define parent child relation ship
<source lang="html4strict">
Z:\>pdm_extract -f "Select * from User_Query WHERE obj_persid like '%1540922%'" > store2 User_Query
rows:55
</source>
<source lang="html4strict">
TABLE User_Query
expanded factory id label last_mod_by last_mod_dt obj_persid parent persid
query query_set query_type sequence
{ "0" ,"" ,"401337'',"My Queue" ,"" ,"" ,"acctyp:1540922" ,"0",
"usq:401337" ,"" ,"0" ,"" ,"100" }
{ "0" ,"cr" ,"401338" ,"Today's Tickets",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"04/18/2008 13:28:32" ,"acctyp:1540922",
"400954" ,"usq:401338" ,"my Today" ,"0" ,"0" ,"150" }
{ "0" ,"cr" ,"401339" ,"Today's Pending",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"05/12/2008 10:55:40" ,"acctyp:1540922",
"400954" ,"usq:401339" ,"my todaypend" ,"0" ,"0" ,"175" }
{ "0" ,"cr" ,"401340" ,"Today's Open" ,"E7F07AAB67A1DA469F51FB1BC30097CF",
"04/18/2008 13:31:32" ,"acctyp:1540922" ,"400954" ,"usq:401340",
"MY TODAY OPE" ,"0" ,"0" ,"187" }
{ "0" ,"cr" ,"401341" ,"Today's closed",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"04/18/2008 13:33:02" ,"acctyp:1540922",
"400954" ,"usq:401341" ,"my today clo" ,"0" ,"0" ,"193" }
{ "0" ,"cr" ,"401342" ,"Yesterday's pending",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"04/18/2008 13:33:28" ,"acctyp:1540922",
"400954" ,"usq:401342" ,"My Yesterday" ,"0" ,"0" ,"196" }
{ "0" ,"cr" ,"401343" ,"My Incidents" ,"" ,"" ,"acctyp:1540922" ,"400954",
"usq:401343" ,"LOGININ" ,"0" ,"" ,"200" }
\
\
\
</Source>
The Bold and italic item is the actual ID of the Parent folder. The bold are the old parent ID,, use the find and replace feature to replace each and every parent ID with the new parent ID of the parent folder.
<source lang="html4strict">
TABLE User_Query
expanded factory id label last_mod_by last_mod_dt obj_persid parent persid
query query_set query_type sequence
{ "0" ,"" ,"401337'',"My Queue" ,"" ,"" ,"acctyp:1540922" ,"0",
"usq:401337" ,"" ,"0" ,"" ,"100" }
{ "0" ,"cr" ,"401338" ,"Today's Tickets",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"04/18/2008 13:28:32" ,"acctyp:1540922",
"'401337'" ,"usq:401338" ,"my Today" ,"0" ,"0" ,"150" }
{ "0" ,"cr" ,"401339" ,"Today's Pending",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"05/12/2008 10:55:40" ,"acctyp:1540922",
"'401337'" ,"usq:401339" ,"my todaypend" ,"0" ,"0" ,"175" }
{ "0" ,"cr" ,"401340" ,"Today's Open" ,"E7F07AAB67A1DA469F51FB1BC30097CF",
"04/18/2008 13:31:32" ,"acctyp:1540922" ,"401337" ,"usq:401340",
"MY TODAY OPE" ,"0" ,"0" ,"187" }
{ "0" ,"cr" ,"401341" ,"Today's closed",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"04/18/2008 13:33:02" ,"acctyp:1540922",
"'401337'" ,"usq:401341" ,"my today clo" ,"0" ,"0" ,"193" }
{ "0" ,"cr" ,"401342" ,"Yesterday's pending",
"E7F07AAB67A1DA469F51FB1BC30097CF" ,"04/18/2008 13:33:28" ,"acctyp:1540922",
"'401337'" ,"usq:401342" ,"My Yesterday" ,"0" ,"0" ,"196" }
{ "0" ,"cr" ,"401343" ,"My Incidents" ,"" ,"" ,"acctyp:1540922" ,"400954",
"usq:401343" ,"LOGININ" ,"0" ,"" ,"200" }
\
</source>
Once the file is ready you can load it back
<source lang="html4strict">
pdm_load -f filename
</source>