• Use view alias for VIEW_NAME js variable

    By Peter Kempf 2 decades ago

    $$ViewTemplateDefault - HTML Head Content



    Use minus one to get the view alias. Otherwise I think there may be a problem making an inexact match fetching the view data from Domino. I was having problems with a view in the old R5 team room "By Category" that was not returning the correct view. Making this change worked since the view had a unique alias (ActiveCategory) without spaces.



    "var VIEW_NAME = '" + @ReplaceSubstring(@Subset(@ViewTitle;-1);"'": "\";"\'":"\\")



    This is a very cool tool. Its a shame that IBM has not made greater advances in providing this type of database access. But that's another subject….

    • Thanks

      By Jeremy G Hodge 2 decades ago

      You are correct, the code could possibly create a mismatch if there are views named the same with different alias. The code provided in the view template default is really just an example on how to implement the code, so i wouldnt classify this as a "bug" per se, but i've updated the examples to use the -1 on the @Subset of the @ViewTitle.