44586,
55585,
66564,
7- 565,"bya[_^`Ce<8\VYO><\gK?:i5>z_li@k3JlsB2^?LUnD13KqyMi_vFWeJVK4dObB=3p9<p7ddX@s<TXva;egQQC:eo9cjFX7KM8t4\9quZ<ToSqrrLV8C8rUD6liRzgByKkyalsRD=>x_2OzUy`3VUbAI:r[\VQcGj;AJ3]rsYe=Sg`zbF8fY[FAKNm9iihic>W?@c3jb "
7+ 565,"c6tavyY\4i5uzUh?gAMJ;Me:U8_>[PPZB_THlU_xnNJb]q4BZp24AeaMk]bxzy3=4>FVU<4YVn]6J03Z[[:2xX<Mf^XfbOk@RV5>0kh4G2B=^1:jcuGMX8vEC_c`WRRLm9u8FeUo[cpZb45mPbIB>EdM[byciP@gx?eWQeMJ^v7_2r6Z\5=MZApVbzj7NzR?liJ4:QG> "
88559,1
99928,0
1010593,
2525569,0
2626592,0
2727599,1000
28- 560,4
28+ 560,5
2929pLogOutput
3030pStrictErrorHandling
3131pGroup
32+ pAlias
3233pDelim
33- 561 ,4
34+ 561 ,5
34351
35361
36372
37382
38- 590 ,4
39+ 2
40+ 590 ,5
3941pLogOutput ,0
4042pStrictErrorHandling ,0
4143pGroup ,""
44+ pAlias ,""
4245pDelim ,"&"
43- 637 ,4
46+ 637 ,5
4447pLogOutput ,"OPTIONAL: Write parameters and action summary to server message log (Boolean True = 1)"
4548pStrictErrorHandling ,"OPTIONAL: On encountering any error, exit with major error status by ProcessQuit after writing to the server message log (Boolean True = 1)"
4649pGroup ,"REQUIRED: Groups separated by delimiter"
50+ pAlias ,"OPTIONAL: single or delimited list of }TM1_DefaultDisplayValue alias to assign to group (if list of groups then size of list of aliases must be the same!)"
4751pDelim ,"OPTIONAL: Delimiter character (Defaults to & if left blank)"
4852577 ,0
4953578 ,0
@@ -52,13 +56,13 @@ pDelim,"OPTIONAL: Delimiter character (Defaults to & if left blank)"
5256581 ,0
5357582 ,0
5458603 ,0
55- 572 ,99
59+ 572 ,108
5660#Region CallThisProcess
5761# A snippet of code provided as an example how to call this process should the developer be working on a system without access to an editor with auto -complete .
5862If ( 1 = 0 );
5963 ExecuteProcess ( '}bedrock.security.group.create' , 'pLogOutput' , pLogOutput ,
6064 'pStrictErrorHandling' , pStrictErrorHandling ,
61- 'pGroup' , '' , 'pDelim' , '&'
65+ 'pGroup' , '' , 'pAlias' , '' , ' pDelim' , '&'
6266 );
6367EndIf ;
6468#EndRegion CallThisProcess
@@ -126,6 +130,15 @@ If( nErrors <> 0 );
126130 EndIf ;
127131EndIf ;
128132
133+ # Alias
134+ If ( pAlias @<> '' );
135+ If ( DimensionExists ( '}ElementAttributes_}Groups' ) = 0 );
136+ AttrInsert ( '}Groups' , '' , '}TM1_DefaultDisplayValue' , 'A' );
137+ ElseIf ( DimIx ( '}ElementAttributes_}Groups' , '}TM1_DefaultDisplayValue' ) = 0 );
138+ AttrInsert ( '}Groups' , '' , '}TM1_DefaultDisplayValue' , 'A' );
139+ EndIf ;
140+ EndIf ;
141+
129142### Split pGroups into individual groups and add ###
130143sGroups = pGroup ;
131144nDelimiterIndex = 1 ;
@@ -162,7 +175,7 @@ EndIf;
162175#****Begin : Generated Statements ***
163176#****End : Generated Statements ****
164177
165- 575 ,30
178+ 575 ,60
166179
167180#****Begin : Generated Statements ***
168181#****End : Generated Statements ****
@@ -171,6 +184,39 @@ EndIf;
171184##~~Join the bedrock TM1 community on GitHub https ://github . com/cubewise-code/bedrock Ver 4.0~~##
172185#################################################################################################
173186
187+ ### Update Alias
188+
189+ If ( nErrors = 0 );
190+
191+ sAliases = pAlias ;
192+ sGroups = pGroup ;
193+ nDelimiterIndex = 1 ;
194+
195+ While ( nDelimiterIndex > 0 );
196+ nDelimiterIndex = Scan ( pDelim , sAliases );
197+ If ( nDelimiterIndex = 0 );
198+ sAlias = sAliases ;
199+ Else ;
200+ sAlias = Trim ( SubSt ( sAliases , 1 , nDelimiterIndex - 1 ) );
201+ sAliases = Trim ( Subst ( sAliases , nDelimiterIndex + Long (pDelim ), Long ( sAliases ) ) );
202+ EndIf ;
203+ nDelimiterIndex = Scan ( pDelim , sGroups );
204+ If ( nDelimiterIndex = 0 );
205+ sGroup = sGroups ;
206+ Else ;
207+ sGroup = Trim ( SubSt ( sGroups , 1 , nDelimiterIndex - 1 ) );
208+ sGroups = Trim ( Subst ( sGroups , nDelimiterIndex + Long (pDelim ), Long ( sGroups ) ) );
209+ EndIf ;
210+
211+ If ( DimIx ( '}Groups' , sGroup ) > 0 );
212+ If ( sAlias @<> '' );
213+ AttrPutS ( sAlias , '}Groups' , sGroup , '}TM1_DefaultDisplayValue' , 1 );
214+ EndIf ;
215+ EndIf ;
216+ End ;
217+
218+ EndIf ;
219+
174220### Return code & final error message handling
175221If ( nErrors > 0 );
176222 sMessage = 'the process incurred at least 1 error. Please see above lines in this file for more details.' ;
@@ -189,10 +235,7 @@ Else;
189235 EndIf ;
190236EndIf ;
191237
192-
193-
194238### End Epilog ###
195-
196239576 ,CubeAction =1511 DataAction =1503 CubeLogChanges =0
197240930 ,0
198241638 ,1
0 commit comments