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

How do I format SharePoint lookup extra column field?

itemRecord.'Event:FY' gives me 21.0000000 in my label. This is correct, except how do I format it so that I do not get the decimal place and trailing zero's. I have checked that decimal places is set to zero in the original SP list and the list using the lookup comes across as integer. I have tried Text(itemRecord.'Event:FY'.Value, "##"), but I am assuming it does not like the colon or quotes.

1 ACCEPTED SOLUTION

Accepted Solutions
Kevin00
Helper I
Helper I

I had to force the DefaultSelectedItems in to a Table.

Table( {Value: Value(ThisItem.'Event:FY'.Value)} )

View solution in original post

5 REPLIES 5
Drrickryp
Super User II
Super User II

@Kevin00 

Round(ItemRecord.'Event:FY'*1,0) You could use RoundUp or RoundDown instead depending on your need.

I like to use *1 as a shortcut to Value().

No function seems to work. I think it is due to the 'Event:FY' format but that is the format in Items and the data is coming across.

Hi@Kevin00,

Based on the issue that you mentioned, do you want to remove decimals?

Could you please tell me that if this 'Event:FY' is a Lookup column?

Generally, the number in the Lookup column will have decimals by default.

Please set the Text property of the Label as below:

Text(Value(ThisItem.'Event:FY'.Value), "[$-en-US]##,###,###")

Hope it could help.

Regards,

Qi

I must be missing something so let me give more details. When I just throw a label on the screen and do something like... Value(itemRecord.'Event:FY'.Value) ... I get an integer like "21", which is what I want.

Currently I have my field on a datacard on a form like... 

Kevin00_0-1614976110791.png

 

Kevin00_2-1614976441176.png

The main card "dcEventFY" has [DataField: "Event_x003a_FY"] [Default: ThisItem.'Event:FY'] [Update: dcEventFYValue].

 

If I try using (Value(itemRecord.'BSCSRFAMAEvent:FY'.Value)), or even substituting "ThisItem" for "itemRecord", into DefaultSelectedItems it still expects a Table.

 

I am obviously missing something in syntax and reference understanding in regards to datacards and/or table, records, value in regards to lookup fields.

Kevin00
Helper I
Helper I

I had to force the DefaultSelectedItems in to a Table.

Table( {Value: Value(ThisItem.'Event:FY'.Value)} )

View solution in original post

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (37,211)