cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sophiegong
Helper I
Helper I

how to change data type under formviewer

Dear All,

I am fresh people for Power apps.

Data source is onedrive excle,import to formviewer in power apps as below. But how to convert the data type?

1.End of work Day change to short date MM/dd/yyyy

2.How to add thousands separator for Number 

3.How to change 0.07 to 7%

 

33333.png

1 ACCEPTED SOLUTION

Accepted Solutions
SebS
Memorable Member
Memorable Member

@Sophiegong 

 

Sorry forgot about Your number issue here :

 

Text(Parent.Default, "0,000" )

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

View solution in original post

6 REPLIES 6
SebS
Memorable Member
Memorable Member

Hi @Sophiegong 

 

Unlock Your DataCard and click the text box with the value. You looking to Format this control. There should be Default Property and inside expression Parent.Default.

 

You need to wrap it in Text() Function now for date:

 

 

Text(Parent.Default,"dd-mm-yyyy")

 

 

I hope You mean 0.07 should be 0.07% but if You need to show 7% You need to multiple it by 100 and format it to % as below but if it should be 0.07% remove the 100 multiplayer and additional brackets

 

 

Text((Parent.Default)*100,"0%")

 

 

 

Hope this helps

 

 


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
SebS
Memorable Member
Memorable Member

@Sophiegong 

 

Sorry forgot about Your number issue here :

 

Text(Parent.Default, "0,000" )

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
Sophiegong
Helper I
Helper I

It is really strange that the percentage is works, but date and number are not.

 

111111.png22222.png3333.png

Sophiegong
Helper I
Helper I

Text(DateTimeValue(Parent.Default),DateTimeFormat.ShortDate)

Finally I use this expression to get correct date format.

 

Dear,I got another error for date format in datatable, when the Datasource is blank,there will be error display in datatable.Do you have any idea for that?

 

If(IsBlank(ThisItem.'Posting Date'),"",Text((ThisItem.'Posting Date'),ShortDate))

 

屏幕截图 2022-12-08 165252.jpg

If(IsBlank(ThisItem.'Posting Date') || IsEmpty(ThisItem.'Posting Date'),IsBlank(),Text((ThisItem.'Posting Date'),ShortDate))

 

But You need to handle this on input if the error exist in the row isBlank() will not help


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,685)