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

 

Best 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

 

Best Regards,
Qi

View solution in original post

Thank you @v-qiaqi-msft ,

now it's working

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,497)