I’m trying to dynamically update the URL for an HTML Widget to pass the username and terminal at login and cannot seem to get it to work. I found this topic…
… but It’s unclear to me how Q actually resolved his issue, which appears to be the same problem I’m having. I see where he shows his actions/rules but when was he firing the rule after all was said and done? At login? I cant seem to wrap my brain around how he accomplished this.
Ive also tried using an HTML Popup but it doesn’t seem to like the '.replace(/\…". In fact I can’t even do a show message with .replace. Is that normal? It crashes Samba every time. Is that something that would need to be scripted and then called?
An exception is thrown using replace(/\s/g, '%20')
try replace(/\\s/g, '%20') as it’s parsed by .NET’s regex, not JavaScript.
I also see the replace() passed a parameter when using it as the widget’s URL value but I am having no luck setting the widget value via the action.
Then there are two issues using settings in the URL: first, one can’t use a local setting in the URL as local settings aren’t parsed. Second, is one can’t use nested values in the URL (e.g. {SETTING:CHAT_URL_{SETTING:CURRENTTERMINAL}})
I also see no way of reading/writing to file.
This would be super easy if one could use a local setting or the URL was parsed by the engine that replaces all dynamic parameters. Maybe the devs would be willing to make a tweak or two.