Hi,
I have an issue around the identifying the app user. Chiefly as all users will be using the one device to access the apps so it will be a generic user name.
To get around this I am using an intro screen asking people to 'log-in' by entering their name - which is checked against Office 365 user list - and then navigates to a menu screen.
However, there are places within the app where I would like to use their first name rather than Selected.DisplayName
I have tried First(Split(Label1.Text," ").Result but this isn't working as it appears to want a "Sting" rather than Label1.Text.
Any ideas how I can extract the first name please.
@Anonymous
Can you please send a screenshot of your workspace? I'd like to see what your app looks like and the error highlighted in the formula bar.
Note: this formula was missing a close bracket
First(Split(DataCard_UserName.Selected.DisplayName," ")).Result
As an alternative solution, you could ask the user to enter a preferred name then store that in a data source (SharePoint) with their Office365 info. Then use that throughout the app? You'd only need to do this once. Just a thought
Hi @mdevaney ,
I'm putting the formula into the text property of a label: "Hello " & First(Split(DataCard_UserName.Selected.DisplayName," ").Result
It's still says it's expecting text instead of DataCard_UserName? I know you can create a string using Text( but wouldn't know how or where to put it within this formula.
DataCard_USerName is a Combo Box that checks the name against Office365 users
Kev
@Anonymous
Your formula strikes me as being correct but would it be possible to replace Label1.Text with a reference to the ComboBox holding the UserName instead? It should extract the FirstName
First(Split(ComboBox_UserName.Selected.DisplayName," ")).Result
By the way what type of control are you putting this formula into? This could also be the reason for the error
—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
WarrenBelz
146,771
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional