Forum Discussion
Pawel
12 months agoNew Contributor II
It turned out it is not possible by an export/import but there is a way by stepping in the application database.
''' query to delete specific TR Group from TR Profiles
Dim trGroupName As String = "FW_1000_COMMON"
Dim trProfName As String = "___/_TB/_LOAD"
Dim querry As String = $"
delete rpm
from StageRuleProfiles rp
join StageRuleProfileMembers rpm on rpm.[RuleProfileKey] = rp.[UniqueID]
join StageRuleGroups rg on rpm.[RuleGroupKey] = rg.[UniqueID]
where 1=1
and rp.[RuleProfileName] like '{trProfName}' escape '/'
and rg.[RuleGroupName] = '{trGroupName}'
"
'Return the DataTable
Using dbConnApp As DBConnInfo = BRAPi.Database.CreateApplicationDbConnInfo(si)
Return BRAPi.Database.ExecuteSql(dbConnApp, querry, False)
End Using
KarlT
OneStream Employee
12 months agoI personally would avoid this type of SQL manipulation.
I'd be interested to understand the use case that requires this automation of changing the group assigned to the profile?
Related Content
- 2 years ago
- 2 years ago