61
					Ideas/Suggestions / Re: replace filename
« Last post by RTT on January 18, 2023, 02:29:20 AM »Not possible while using the builtin ReplaceS function (the parameters are fixed, not parsed for dynamic content), but doable with a custom script.
With a custom script, named ReplaceStr, with this code:
With your example: [ReplaceStr]([F],replace this,[myScript])
				With a custom script, named ReplaceStr, with this code:
Code: [Select]
function ReplaceStr() {
    var params = CurrentField.value.split(',', 3);
    if (params.length == 3) {
        return params[0].replace(params[1], params[2]);
    }
}
you can then use this syntax: [ReplaceStr](source,searchValue,newValue)With your example: [ReplaceStr]([F],replace this,[myScript])
 
			 
		 Recent Posts
Recent Posts