cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
livingstonep
Level 8

Format datatable column as GBP currency using AddColumns

Hi,

 

I am trying to format a column in a datatable using AddColumns and giving the format ...
The source column in the SP list is a currency

In the List in SharePoint it shows as a currency e.g. £41.40

 

here is my AddColumns code:

 

AddColumns(TrackMySalesCollection,
"Item Description", Description
, "Box No", BoxNo
, "Item Category", Category
, "Till Code", TillCode
, "eBay Ref", eBayRef
, "Gift Aid ID", GiftAidID
, "Booked Collection Date", Text(BookedCollectionDate, "[$-en-US]dd mmm yyyy")
, "Store Valuation", Text(StoreValuation, "[$-en-US]£#,##0.00") //"[$-en-US]$00.00"
, "Value Achieved", Text(ValueAchieved, "[$-en-GB]£0.00")
, "Item Status", Status
, "Date Sold", Text(DateSold, "[$-en-US]dd mmm yyyy")
, "Date Listed", Text(DateListed, "[$-en-US]dd mmm yyyy")
, "Item Comments", Comments
, "Item Defects", Defects
)

The two columns I am having trouble with are:

, "Store Valuation", Text(StoreValuation, "[$-en-US]£#,##0.00") //"[$-en-US]$00.00"
, "Value Achieved", Text(ValueAchieved, "[$-en-GB]£0.00")

 

I have also tried several other options like 

"Value Achieved", Text(ValueAchieved, "£0.00")

 

but it looks like this when I run the PowerApp:
Capture.PNG

what would be the correct way to format those values in the datatable as GBP UK currency with £?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Format datatable column as GBP currency using AddColumns

Hi @livingstonep,

Could you please share a bit more about the Store Valuation column and Value Achieved column? Are they Currency type column in your SP list data source?

Based on the needs that you provided, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

The Data structure of my SP list as below:6.JPGApp's configuration as below:5.JPG

Set the Items proeprty of the Data Table control to following:

AddColumns('20181224_case4', "FormattedStoreValuation", Text('Store Valuation',"[$-en-US]£ #,##0.00"))

the GBP UK currency value with £ formatted well as above.

 

Please check if you have typed proper Currency column name (e.g. 'StoreValuation', 'ValueAchieved') of your SP list within your Text function.

You could also consider take a try to save the result the AddColumns formula returned into a Collection, then check if the formatted Currency column value stored well in this Collection. Please take a try with the following formula:

 

ClearCollect(
      RecordsCollection,
      AddColumns(
TrackMySalesCollection, "Item Description", Description,
"Box No", BoxNo,
"Item Category", Category,
"Till Code", TillCode,
"eBay Ref", eBayRef,
"Gift Aid ID", GiftAidID,
"Booked Collection Date", Text(BookedCollectionDate, "[$-en-US]dd mmm yyyy"),
"Store Valuation", Text(StoreValuation, "[$-en-US]£ #,##0.00") //"[$-en-US]$00.00",
"Value Achieved", Text(ValueAchieved, "[$-en-US]£ 0.00"),
"Item Status", Status,
"Date Sold", Text(DateSold, "[$-en-US]dd mmm yyyy"),
"Date Listed", Text(DateListed, "[$-en-US]dd mmm yyyy"),
"Item Comments", Comments,
"Item Defects", Defects ) )

In addition, you could also consider take a try to list the result the AddColumns formula returned within a Gallery control. Then add a Label control within the Gallery, set the Text property of the Label control to following:

ThisItem.'Store Valuation'

then check if the formatted Currency column value display well in your Gallery.

If the issue still exists, please consider take a try to re-create an app, then try your formula again, check if the issue is solved.

 

Best regards,

Kris

 

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Format datatable column as GBP currency using AddColumns

Hi @livingstonep,

Could you please share a bit more about the Store Valuation column and Value Achieved column? Are they Currency type column in your SP list data source?

Based on the needs that you provided, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

The Data structure of my SP list as below:6.JPGApp's configuration as below:5.JPG

Set the Items proeprty of the Data Table control to following:

AddColumns('20181224_case4', "FormattedStoreValuation", Text('Store Valuation',"[$-en-US]£ #,##0.00"))

the GBP UK currency value with £ formatted well as above.

 

Please check if you have typed proper Currency column name (e.g. 'StoreValuation', 'ValueAchieved') of your SP list within your Text function.

You could also consider take a try to save the result the AddColumns formula returned into a Collection, then check if the formatted Currency column value stored well in this Collection. Please take a try with the following formula:

 

ClearCollect(
      RecordsCollection,
      AddColumns(
TrackMySalesCollection, "Item Description", Description,
"Box No", BoxNo,
"Item Category", Category,
"Till Code", TillCode,
"eBay Ref", eBayRef,
"Gift Aid ID", GiftAidID,
"Booked Collection Date", Text(BookedCollectionDate, "[$-en-US]dd mmm yyyy"),
"Store Valuation", Text(StoreValuation, "[$-en-US]£ #,##0.00") //"[$-en-US]$00.00",
"Value Achieved", Text(ValueAchieved, "[$-en-US]£ 0.00"),
"Item Status", Status,
"Date Sold", Text(DateSold, "[$-en-US]dd mmm yyyy"),
"Date Listed", Text(DateListed, "[$-en-US]dd mmm yyyy"),
"Item Comments", Comments,
"Item Defects", Defects ) )

In addition, you could also consider take a try to list the result the AddColumns formula returned within a Gallery control. Then add a Label control within the Gallery, set the Text property of the Label control to following:

ThisItem.'Store Valuation'

then check if the formatted Currency column value display well in your Gallery.

If the issue still exists, please consider take a try to re-create an app, then try your formula again, check if the issue is solved.

 

Best regards,

Kris

 

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,072)