cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-64881%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EFind%2FReplace%20Chart%20Name%20within%20Report%2FOutput%20Window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-64881%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20think%20it%20would%20be%20useful%20to%20have%20a%20Find%2FReplace%20function%20to%20operate%20on%20output%20window%20chart%20names.%3C%2FP%3E%0A%3CP%3EFor%20example%3A%3C%2FP%3E%0A%3CP%3EChart%20Name%20%3D%20%22Variability%20Chart%20for%20%3CCOLUMN%20name%3D%22%22%3E%22%3C%2FCOLUMN%3E%3C%2FP%3E%0A%3CP%3EFind%3A%20%22Variability%20Chart%20for%22%20%26amp%3B%20Replace%20with%20%22%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20would%20save%20us%20from%20having%20to%20script%20variability%20charts.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECheers%2C%3C%2FP%3E%0A%3CP%3EGareth%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-64881%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EUser%20Interface%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-249620%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Find%2FReplace%20Chart%20Name%20within%20Report%2FOutput%20Window%20-%20Status%20changed%20to%3A%20Declined%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-249620%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThis%20would%20be%20very%20difficult%20for%20us%20to%20do%20in%20a%20general%20way.%20We%20really%20could%20only%20support%20finding%20and%20replacing%20in%20outline%20box%20headings.%20As%20such%2C%20the%20function%20that%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F7677%22%20target%3D%22_blank%22%3E%40DaveB%3C%2FA%3E%26nbsp%3Bprovided%20above%20is%20equivalent%20to%20what%20we%20could%20provide.%20It's%20probably%20best%20to%20take%20that%20function%20and%20use%20it%20in%20an%20add-in%20that%20would%20provide%20a%20simple%20user%20interface.%20Perhaps%20another%20community%20member%20will%20do%20that%20and%20post%20it%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FFile-Exchange%2Fct-p%2FFileExchange%22%20target%3D%22_self%22%3EFile%20Exchange%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-247023%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Find%2FReplace%20Chart%20Name%20within%20Report%2FOutput%20Window%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-247023%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3Eif%20you%20want%20a%20general%20purpose%20function%20to%20replace%20the%20text%20in%20outline%20titles%2C%20you%20could%20do%20something%20like%20this%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ereplace%20outline%20text%20%3D%20Function(%20%7Bold%2C%20new%7D%2C%0A%20match%20%3D%20Eval(%20Eval%20Expr(%20Current%20Report()%20%26lt%3B%26lt%3B%20xpath(%20Expr(%20Expr(%20%22%2F%2FOutlineBox%5Bcontains(text()%2C'%22%20)%20%7C%7C%20old%20%7C%7C%20Expr(%20%22')%5D%22%20)%20)%20)%20)%20)%3B%0A%20For(%20c%20%3D%201%2C%20c%20%26lt%3B%3D%20N%20Items(%20match%20)%2C%20c%2B%2B%2C%0A%20%20new%20title%20%3D%20Substitute(%20(match%5Bc%5D%20%26lt%3B%26lt%3B%20get%20title)%2C%20old%2C%20new%20)%3B%0A%20%20match%5Bc%5D%20%26lt%3B%26lt%3B%20set%20title(%20new%20title%20)%3B%0A%20)%3B%0A)%3B%0A%0Areplace%20outline%20text(%20%22Variability%20Chart%20for%22%2C%20%22%22%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
0 Kudos

Find/Replace Chart Name within Report/Output Window

I think it would be useful to have a Find/Replace function to operate on output window chart names.

For example:

Chart Name = "Variability Chart for <Column Name>"

Find: "Variability Chart for" & Replace with ""

 

It would save us from having to script variability charts.

 

Cheers,

Gareth

2 Comments
DaveB
Staff

if you want a general purpose function to replace the text in outline titles, you could do something like this

 

replace outline text = Function( {old, new},
	match = Eval( Eval Expr( Current Report() << xpath( Expr( Expr( "//OutlineBox[contains(text(),'" ) || old || Expr( "')]" ) ) ) ) );
	For( c = 1, c <= N Items( match ), c++,
		new title = Substitute( (match[c] << get title), old, new );
		match[c] << set title( new title );
	);
);

replace outline text( "Variability Chart for", "" );
Jeff_Perkinson
Community Manager
Status changed to: Not Planned For Now

This would be very difficult for us to do in a general way. We really could only support finding and replacing in outline box headings. As such, the function that @DaveB provided above is equivalent to what we could provide. It's probably best to take that function and use it in an add-in that would provide a simple user interface. Perhaps another community member will do that and post it to the File Exchange.