Quote from: inu on 12 Aug 2016 12:40:18 AM
Hi Guys,
I went through google , but could get the clearance from below macro expression is being used in template in my project.
#substitute('XYZ','Agreement Fact - Monthly',prompt('Par_Represent','token','[XYZ].[Time Dimension(Fiscal Calendar)].[Month Name]'))#
Can any one explain the use of the same with example..
Thanks
Inam
Why did you go through google rather than just looking at the Information pane in the expression editor? Here's what it says:
substitute ( pattern_string, replacement_string, string_expression|array_expression )Searches for a pattern in a string or in the string elements of an array and substitutes the first occurrence of "pattern_string" with "replacement_string".
Example: #sq ( substitute ( '^cn=', '***', 'cn=help' ) )#
Result: '***help'
Example: # csv ( substitute ( '^cn=', '***', array ( 'cn=help' , 'acn=5' ) ) ) #
Result: '***help', 'acn=5'
Example: # csv ( substitute ( 'cn=', '', array ( 'cn=help' , 'acn=5' ) ) ) #
Result: 'help', 'a5'
MF.