Question & Answer
Question
What is the difference between the CSAPI functions PreferenceNameSubstitutionForAUser and PreferenceSubstitutionForAUser?
Cause
Considerable customer confusion about the differences between the PreferenceNameSubstitutionForAUser and PreferenceSubstitutionForAUser methods
Answer
The PreferenceNameSubstitutionForAUser method will make substitutions within the name of a preference. For example:
_USER_CFG_ewogan_\\machineA\ccmdb\databaseA = [CCM_REPORT]... all the users reports, queries, etcetera for database A.
If your database moves (for example, the database path changes) then you need to update all of the names (keys) to reflect the database change, so you would run the PreferenceNameSubstitutionForAUser method to update the preference names.
On the other hand, if you need to make a substitution within the value of a preference, then you use the PreferenceSubstitutionForAUser method. For example, a report name within the user configuration entry has been changed from problem_review to problem_reviews. So when this method is invoked, any place "problem_review" is found within the _USER_CFG_ value it will be changed to problem_reviews".
Was this topic helpful?
Document Information
Modified date:
13 November 2019
UID
swg21416582