-
1. Re: <User Name> vs USERNAME()
Jeff StraussApr 24, 2017 9:19 AM (in response to Vincent Baumel)
I'm not familiar with the construct of "<User Name>", but one option that we have deployed to eliminate the domain is to create a calculated field such as this:
LOWER(replace(replace(username(),"\",""),"external",""))
-
2. Re: <User Name> vs USERNAME()
Vincent Baumel Apr 24, 2017 9:39 AM (in response to Jeff Strauss)This would work well, except for one problem. The workbook is designed to be exported to PDF, and specifically exported as "Sheets in Workbook". Dashboards will still download and render as single pages if and only if they don't include worksheets in them. That means I'm free to add image files and text boxes, and a few dynamic strings (parameters, sheet name, workbook name, and these Full Name/User Name fields.
If I want this dashboard to download correctly as a single page worksheet, I need the dynamic fields to populate this correctly. If I run your calculation then use it's results to populate a parameter list (what I had tried this time in the UserName parameter), it only retains a static email. The value of the calculation will change depending on the login used, but the parameter list cannot change on the fly.
It's a pretty unique use case, and trying to develop a worksheet-less dashboard that is simultaneously static and dynamic is proving to be unsurprisingly challenging!
-
3. Re: <User Name> vs USERNAME()
Jeff StraussApr 24, 2017 9:52 AM (in response to Vincent Baumel)
oh, now I see your issue. Not sure what to do yet though as the text object only allows what you are showing. Can you just add another worksheet to your dashboard that has the required info?
-
4. Re: <User Name> vs USERNAME()
Vincent Baumel Apr 24, 2017 9:58 AM (in response to Jeff Strauss)This was a requested addition to a Title Page dashboard, so no. I've got footers on the rest of the worksheets that pull in a contact email address from the data itself, but this one is throwing me for a bit of a loop.
-
5. Re: <User Name> vs USERNAME()
Jeff StraussApr 24, 2017 10:01 AM (in response to Vincent Baumel)
and what does it hurt to have the domain as part of the title?
-
6. Re: <User Name> vs USERNAME()
Vincent Baumel Apr 24, 2017 10:44 AM (in response to Jeff Strauss)This report is going to be delivered by our sales team to potential clients, so having a cleaned email address is preferable to one prefixed with a domain. Additionally, I'm not sure what else might pop up besides "external\" so I can't completely anticipate what will display; I assume it'll always be external\ since we deploy via Tableau Online, though.
-
7. Re: <User Name> vs USERNAME()
Jeff StraussApr 24, 2017 11:05 AM (in response to Vincent Baumel)
1 of 1 people found this helpfulNot sure if this is a clean solution for you or not, admittedly it's a workaround.
Would it work to have a white filled floating text box that is on top of the domain?
-
8. Re: <User Name> vs USERNAME()
Vincent Baumel Apr 24, 2017 11:09 AM (in response to Jeff Strauss)Clever idea, Jeff. I like it! I was planning to center align the field, but if I can find an elegant way to left align it that will work for now. I'll mark it as a helpful comment, but I would like to get a better idea of how exactly that <User Name> parameter-type function works.
-
9. Re: <User Name> vs USERNAME()
Justin Larson Apr 24, 2017 1:43 PM (in response to Vincent Baumel)It's possible I'm missing the issue, but can you just create a calculated field with the calculation USERNAME() and include it on the view? Then add the field instead of the <> shortcut. Should be the same for every row, so won't break any LOD.
-
10. Re: <User Name> vs USERNAME()
Vincent Baumel Apr 24, 2017 1:48 PM (in response to Justin Larson)The problem is that I have to draw this data from OUTSIDE the data source, and a calculation of USERNAME(), while simple, would exist IN the data source rendering it out of bounds for what I need. In order to bring that calculation into the dashboard I would need to bring a worksheet into the dashboard, which I cannot do in this case.
-
11. Re: <User Name> vs USERNAME()
Justin Larson Apr 24, 2017 2:24 PM (in response to Vincent Baumel)Hmm, I was thinking of creating an empty worksheet and using the worksheet title as a textbox, as it's basically the same thing as a textbox.
Why do you need to keep it outside a data source?
-
12. Re: <User Name> vs USERNAME()
Vincent Baumel Apr 24, 2017 2:27 PM (in response to Justin Larson)See the second post in this thread (my reply to Jeff with the screenshot). I explain why there.
-
13. Re: <User Name> vs USERNAME()
Justin Larson Apr 24, 2017 2:38 PM (in response to Vincent Baumel)gotcha'. Didn't see that in the back and forth.
-
14. Re: <User Name> vs USERNAME()
Jeff StraussApr 24, 2017 3:49 PM (in response to Vincent Baumel)
I have one more idea. How are you referencing this report? If you're doing it by way of an ?embed=yes inside of another web page or tabcmd export or using the javascript api, then you may be able to figure out who the logged in user is outside of the report itself and then pass in the username via a defined parameter (i.e. &defined_pass_in_username=xxxx) and then display this within your text box.