cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EdevaldoJeronim
Resolver I
Resolver I

Format number inside gallery

Hi,

I have a lookup field Number in Sharepoint but when i try to show this number inside the Gallery appears the format below

"5.0000000000" but should be "5" because it is a integer number.

How can solve this problem? I try to format using this formula but doesn't work-> Text(ThisItem.IdGrupo.Value;"[$-pt-BR]#.#")

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@EdevaldoJeronim,

Based on the issue that you mentioned, do you want to remove decimals from your Lookup field?

Could you please share a bit more about the scenario?

Actually, you should combine the Text() with the Value().

Set the Text property as below:

Text(Value(ThisItem.IdGrupo.Value),"[$-pt-BR]##.###.###")

Here is the comparison:2021-02-26-01.png

 

2021-02-26-02.png

Hope it could help.

Regards,

Qi

 

View solution in original post

7 REPLIES 7
Drrickryp
Super User II
Super User II

@EdevaldoJeronim 

Round(ThisItem.IdGrupo.Value,0)

@Drrickryp ,

If i use the formula Round(ThisItem.IdGrupo.Value) in text propert appears the error "incompatible type" and if I try to use the formula Round(Value(ThisItem.IdGrupo.Value)), appears the same error

Drrickryp
Super User II
Super User II

@EdevaldoJeronim 

What kind of column is idGrupo?  is it a number, single line of text or some other type? If it is a lookup, I always advise against using lookup columns in SharePoint.  Instead I recommend creating a second list and creating a link to the ID column of that list. You can avoid any number of problems by only using single line of text, number and date/time type columns. 

@Drrickryp, yes IdGrupo is a lookup field, i'm trying to use the lookup Field in my list to apply the foreign key. I'm moving the database to  sharepoint list and the most of list there are most of 100.000 records. 

Do you recomend not use the lookup field?

Drrickryp
Super User II
Super User II

@EdevaldoCNH 

I never use them.  For more information regarding why I don't see my blog post here. https://powerusers.microsoft.com/t5/News-Announcements/Relational-Database-Principles-and-PowerApps-... .  Also for very large lists, I recommend using SQL or CDS rather than SharePoint.  It is certainly possible to use them but before getting too deep into the weeds, I strongly recommend that you review @WarrenBelz 's blog here regarding how to best configure SharePoint lists for use in PowerApps.

 https://www.practicalpowerapps.com/ .  After reading this you can decide if SharePoint is the best back-end for you.

v-qiaqi-msft
Community Support
Community Support

Hi@EdevaldoJeronim,

Based on the issue that you mentioned, do you want to remove decimals from your Lookup field?

Could you please share a bit more about the scenario?

Actually, you should combine the Text() with the Value().

Set the Text property as below:

Text(Value(ThisItem.IdGrupo.Value),"[$-pt-BR]##.###.###")

Here is the comparison:2021-02-26-01.png

 

2021-02-26-02.png

Hope it could help.

Regards,

Qi

 

View solution in original post

Thank you @v-qiaqi-msft ,

now it's working

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (55,602)