TMACUL

http://www.servicedeskusers.com/Copying_an_Access_Type_Scoreboard.

Blog Post created by TMACUL Champion on Jan 5, 2016

Copying an Access Type Scoreboard

 

From SDU

Jump to: navigation, search

 

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.


 

Overview

This Article provides the instructions for copying the default Scoreboard of one Access Type and using it for the default of a new Access Type.

Note: r12 includes a copy feature which makes these procedures obsolete when creating a new Access Type. However, they may still be used when wanting to update existing Access Type Scoreboards.

Procedures

Step 1. Obtain of Both Access Types

Run the following command where the sym is the name of the Access Type you are obtaining the id for:

pdm_extract -f "select id from Access_Type where sym='Administrator'"

In this example, the id returned is 2402. Lets assume the id of the other Access Type returned an id of 400001.

Step 2. Backup the User_Query Table

pdm_extract -f "select * from User_Query where obj_persid='acctyp:2402'" > User_Query_bkup.txt

Step 3. Extract the Original Access Type's Scoreboard

pdm_extract -f "select expanded, factory, label, last_mod_by, last_mod_dt, obj_persid, parent, query, query_set, query_type, sequence from User_Query where obj_persid='acctyp:2402'" > score_out.txt

Step 4. Edit the Extract File

Edit the score_out.txt file and change any occurrence of acctyp:2402 to the new access type value of acctyp:400001. Save the modified output to a new file scoreboard_in.txt

Step 5. Load the New Data

pdm_load -i -f scoreboard_in.txt -v

Step 6. Extract Parent References

Now comes the hard part of parent/child relationships... otherwise known as folder/node relationships. Run the following two command:

pdm_extract -f "select id, parent, sequence from User_Query where obj_persid='acctyp:2402'" > part1.txt
pdm_extract -f "select id, parent, sequence from User_Query where obj_persid='acctyp:400001’" > part2.txt

Step 7. Compare the Extracts

Open both these files and place them side by side. Compare part1.txt and part2.txt. Notice all the entries with the parent set to "0". These are the folders that appear on the Scoreboard. All the other entries are the nodes that reside within the folders. Notice how the nodes all reference the id of a parent... in other words the id of the folder they belong to. In the part2.txt extract all the nodes are still referencing the id's of folders belonging to the original Access Type's Scoreboard (part1.txt). What you need to do is change all these parent references to ids belonging to the folders of the new Access Type's Scoreboard. Do this by editing part2.txt and saving it as part2_new.txt.

part1.txtpart2.txtpart2_new.txt
TABLE User_Query id parent sequence { "7872" ,"0" ,"100" } { "7966" ,"7872" ,"200" } { "7967" ,"7872" ,"300" } { "7800" ,"7872" ,"400" } { "7801" ,"7872" ,"500" } { "7802" ,"7872" ,"600" } { "7803" ,"7872" ,"800" } { "7804" ,"7872" ,"800" } { "8051" ,"7872" ,"900" } { "8052" ,"7872" ,"1000" } { "7805" ,"7872" ,"1100" } { "7806" ,"7872" ,"1200" } { "7807" ,"7872" ,"1300" } { "7808" ,"7872" ,"1400" } { "7809" ,"7872" ,"1500" } { "7810" ,"7872" ,"1600" } { "7811" ,"7872" ,"1700" } { "7812" ,"7872" ,"1800" } { "7813" ,"7872" ,"1900" } { "7968" ,"0" ,"2000" } { "7969" ,"7968" ,"2100" } { "42000" ,"7969" ,"2150" } { "7970" ,"7969" ,"2200" } { "7971" ,"7969" ,"2300" } { "7972" ,"7969" ,"2400" } { "7973" ,"7968" ,"2500" }
TABLE User_Query id parent sequence { "400365" ,"0" ,"100" } { "400366" ,"7872" ,"200" } { "400367" ,"7872" ,"300" } { "400368" ,"7872" ,"400" } { "400369" ,"7872" ,"500" } { "400370" ,"7872" ,"600" } { "400371" ,"7872" ,"800" } { "400372" ,"7872" ,"800" } { "400373" ,"7872" ,"900" } { "400374" ,"7872" ,"1000" } { "400375" ,"7872" ,"1100" } { "400376" ,"7872" ,"1200" } { "400377" ,"7872" ,"1300" } { "400378" ,"7872" ,"1400" } { "400379" ,"7872" ,"1500" } { "400380" ,"7872" ,"1600" } { "400381" ,"7872" ,"1700" } { "400382" ,"7872" ,"1800" } { "400383" ,"7872" ,"1900" } { "400384" ,"0" ,"2000" } { "400385" ,"7968" ,"2100" } { "400386" ,"7969" ,"2150" } { "400387" ,"7969" ,"2200" } { "400388" ,"7969" ,"2300" } { "400389" ,"7969" ,"2400" } { "400390" ,"7968" ,"2500" }
TABLE User_Query id parent sequence { "400365" ,"0" ,"100" } { "400366" ," 400365" ,"200" } { "400367" ," 400365" ,"300" } { "400368" ," 400365" ,"400" } { "400369" ," 400365" ,"500" } { "400370" ," 400365" ,"600" } { "400371" ," 400365" ,"800" } { "400372" ," 400365" ,"800" } { "400373" ," 400365" ,"900" } { "400374" ," 400365" ,"1000" } { "400375" ," 400365" ,"1100" } { "400376" ," 400365" ,"1200" } { "400377" ," 400365" ,"1300" } { "400378" ," 400365" ,"1400" } { "400379" ," 400365" ,"1500" } { "400380" ," 400365" ,"1600" } { "400381" ," 400365" ,"1700" } { "400382" ," 400365" ,"1800" } { "400383" ," 400365" ,"1900" } { "400384" ,"0" ,"2000" } { "400385" ," 400384" ,"2100" } { "400386" ," 400385" ,"2150" } { "400387" ," 400385" ,"2200" } { "400388" ," 400385" ,"2300" } { "400389" ," 400385" ,"2400" } { "400390" ," 400384" ,"2500" }

Step 8. Load part2_new.txt

Load the new part2_new.txt file back to update the relevant rows for the new access type.

pdm_load -f part2_new.txt -v

Retrieved from "http://www.servicedeskusers.com/Copying_an_Access_Type_Scoreboard"

 

This page was last modified 12:05, 7 November 2008.  This page has been accessed 4,316 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers

Outcomes