Pass curly braces as literal string in feature description
So I'm trying to set up a link on a layer that will run a Laserfiche search for related documents. The problem is that the Laserfiche link uses curly braces to run its search, which the feature description is interpreting as replacement tokens.
The URL syntax looks like this:
https://laserfiche.ourwebsite.org/laserfiche/browse.aspx?repo=BP-Laserfiche#/?search={search paraemeters and CaseNumber="{My layer's case field}"}
I've tried using %7B and %7D instead for the curly braces, but that didn't work. Any thoughts on if it's possible to pass curly braces as strings instead being interpreted as containing replacement tokens in the feature description?
0
-
Hi John,
I spoke to a few developers here including our lead developer and they are not aware of a method of escaping the curly bracket to use it for anything but a replacement token. I would recommend posting this to the "Ideas" section of the Support Center so it can be considered for a future release.
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner
[Please purchase a license if0 -
Kind of an ugly wrokaround, but can you add:
{search paraemeters and CaseNumber="{My layer's case field}"}
As an attribute to your layer and pass that attribute as a replacement token which would in fact, contain curly braces in your attribute table?0 -
Thanks for asking around, Wayne. Bummer on the response, but it's good to know.
Thanks for the idea, Erik. I kind of already tried that, except I used a one to one data link to generate the text. It still doesnt work when it's used as the href in an <a> tag in the feature description or long description, but it does work in the feature details, which automatically make it a link since it's a URL. So it appears the problem is specific to the feature/long description.
Also, and this might not be helpful to anything, but I played around with adding additional curly braces.
{CaseNumber} will get you the feature's case number (naturally, that's how the token replacement works)
{{CaseNumber}} will get you {CaseNumber} as a literal string. Still doesn't help the situation though.0 -
Another workaround (although I really think this should ultimately be fixed in the HTML viewer):
Replace the laserfiche braces with something else, e.g. [ and ]
Create a proxy script (use proxy.ashx as a sample) that replaces [ with { and ] with }
The URL syntax would then be https://myownserver/viewer/replacebracesproxy.ashx?https%3A%2F%2Flaserfiche.ourwebsite.org%2Flaserfiche%2Fbrowse.aspx%3Frepo%3DBP-Laserfiche%23%2F%3Fsearch%3D%5Bsearch%20paraemeters%20and%20CaseNumber%3D%22%7BMy%20layer%27s%20case%20field%7D%22%5D
Something similar could be done with an URL rewrite rule on the laserfiche server0 -
That would be https%3A%2F%2Flaserfiche.ourwebsite.org%2Flaserfiche%2Fbrowse.aspx%3Frepo%3DBP-Laserfiche%23%2F%3Fsearch%3D%5Bsearch%20paraemeters%20and%20CaseNumber%3D%22{My%20layer%27s%20case%20field}%22%5D
(braces should be unescaped in the URL template)0 -
That's unfortunately too fancy a solution for me to use because I'm not a script writer, but thank you for the idea Berend! Hopefully it'll help out someone else who does have the required skillsets. :)
Posted the idea here in case anyone else reading has this need:
https://support.geocortex.com/essentialsGSCIdeasDetail?c=09a6000000008RsAAI&id=087f2000000bqI7AAI&categ=all&sub-nav=ideas&main-nav=essentials0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
6 Kommentare