cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Gallery Formatting: User Names and Dates

Hello, I am in the process of creating a gallery that has quite a few columns. To make space, I would like to shorten user names to last name, firstinitial. (e.g. Agustin, T.) and I would like to shorten dates to mm/dd/yyyy (e.g. 07/28/2020).

 

My current Text property formulas for the gallery labels are:

ThisItem.Requestor.DisplayName and ThisItem.Created

 

I've attached a screenshot of what the results currently are. As you know, when you are new to Power Apps you can spend an inordinate amount of time trying to figure out very simple things so I would be very grateful for your help. Once I get good at this, I hope to help others the way you are helping newbies such as myself. Thank you to all of you who pitch in on helping us out!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@tagustin2020 

To format the dates do this:

 

Text(ThisItem.Created, "mm/dd/yyyy")

 

To shorten the name do this...

 

With(
    {UserName: Split(ThisItem.Requestor.DisplayName, " ")},
    First(UserName).Result & " " & Left(Last(UserName).Result,1)& "."
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
Super User III
Super User III

@tagustin2020 

To format the dates do this:

 

Text(ThisItem.Created, "mm/dd/yyyy")

 

To shorten the name do this...

 

With(
    {UserName: Split(ThisItem.Requestor.DisplayName, " ")},
    First(UserName).Result & " " & Left(Last(UserName).Result,1)& "."
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Hello Matt, Thank you for your help. The date formula worked like a charm, but I am getting error messages when I enter the username formula into the Text property. I tried both copy/pasting it and manually typing it in.  I have attached screenshots of the red squigglies in the formula and the specific error messages. Is there some other step I need to take to make it work? Kind regards, Teresa

@tagustin2020 
Silly me, I forgot the SPLIT function.  Please see my post above.  I changed it to the working code.

That worked perfect. I marked it as a solution. Thank you Matt!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,892)