cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dual Super User
Dual Super User

Re: Assign a value of a Label to a SharePoint DataCardField

Hey @Luka84 

 

The issue here is you are putting this formula on DisplayMode property but the formula needs to be added as "Default" property of the data card control.
 
Expression:
Amount Requested DataCard Control -> Default-> Value('SERVICE 1 AMT'.Text) + Value('SERVICE 2 AMT'.Text)
 
This just adds value from two text inputs but you can add other controls in this. Please make sure that you are referring to the text property of the control and not the control itself.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Luka84
Level: Powered On

Re: Assign a value of a Label to a SharePoint DataCardField

Hi @yashag2255 ,

That was quite an impressive notice; unfortunately I did this in a hurry on the DisplayMode, but originally it was giving the error on the Default property (I don't have a TEXT property)

This is the error I got when I tried entering it on the Default property - screenshot below

Thank you for replying back so promptly, I seem to solve complex problems but struggle with the simple ones

 

calculate 3.png

Luka84
Level: Powered On

Re: Assign a value of a Label to a SharePoint DataCardField

Good day @yashag2255 ,

I tried moving the "AMOUNT REQUESTED" into the same form as "SERVICES", and everything worked fine.

Are there any restrictions to keep them in different forms though? I don't see a reason it should honestly but I may be unaware of certain powerapps rules. 

My goal is to have them on seperate forms for user experience purposes and to also have flexibility of playing around with the design.

Any advice would be appreciated - thanks 😃

 

Community Support Team
Community Support Team

Re: Assign a value of a Label to a SharePoint DataCardField

Hi @Luka84 ,

Could you please share a bit more about the "AMOUNT REQUESTED" field in your SP list? Is it a Number type column?

Do you want to populate the calculation value within the "AMOUNT REQUESTED" field based on the 'SERVICE 1 AMT' field value, 'SERVICE 2 AMT' field value, ...?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please consider set the Default property of the "AMOUNT REQUESTED" field Text Input box to following:

Sum(
'SERVICE 1 AMT'.Text,
'SERVICE 2 AMT'.Text,
'SERVICE 3 AMT'.Text,
'SERVICE 4 AMT'.Text,
'SERVICE 5 AMT'.Text,
'SERVICE 6 AMT'.Text,
'SERVICE 7 AMT'.Text
)

or

Sum(
     Value('SERVICE 1 AMT'.Text), 
     Value('SERVICE 2 AMT'.Text),
     Value('SERVICE 3 AMT'.Text),
     Value('SERVICE 4 AMT'.Text), 
     Value('SERVICE 5 AMT'.Text), 
     Value('SERVICE 6 AMT'.Text), 
     Value('SERVICE 7 AMT'.Text)
)

If the issue still exists, please add a Label control (SUMOFAMTLabel) within your app, set the Text property to following:

Sum(
     'SERVICE 1 AMT'.Text, 
     'SERVICE 2 AMT'.Text,
     'SERVICE 3 AMT'.Text,
     'SERVICE 4 AMT'.Text, 
     'SERVICE 5 AMT'.Text, 
     'SERVICE 6 AMT'.Text, 
     'SERVICE 7 AMT'.Text
)

Then set the Default property of the "AMOUNT REQUESTED" field Text Input box to following:

Value(SUMOFAMTLabel.Text)

Best regards,

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

Luka84
Level: Powered On

Re: Assign a value of a Label to a SharePoint DataCardField

Hi @v-xida-msft ,

I appreciate your detailed response, I really do !!

But i tried all these solutions without success, and after many tests i realized it is probably not working because I have the "AMOUNT REQUESTED" on a different form than "SERVICE COSTS" - the error is related to a Circular reference.

I even tried assigining the value of my SUMOFAMT label, also with fail

Screenshot below, I really hope we can fix this, since I use this field for my MS FLOW and I really don't want to make so many changes there as it works and I dont want to break anything lol 😃

 

calculate 4.png

Dual Super User
Dual Super User

Re: Assign a value of a Label to a SharePoint DataCardField

Hi @Luka84 

 

No, there is no such restriction on using the fields among multiple forms, I carried out a test myself and this worked even in different forms. I just referred to the controls inside the DataCards and this was working absolutely fine.
 
Circular reference is created in a situation where both the controls are based out on each other for value. This will change both of the values indefinitely and make the app inconsistent.
 
I am not able to reproduce the error, can you share the type of column "Amount Requested"? I will carry out a test based on the same configuration. I did try with the calculated column, but when added in the form, the control was added as a label but in your case it shows, the control is text input. Please share more details so that we might be able to help you better.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Luka84
Level: Powered On

Re: Assign a value of a Label to a SharePoint DataCardField

Hi @yashag2255 , 

I really don't know what to say - since the issue seems to be from my end I ended up doing the following workaround:

  • Created a "TOTALAMT" calculated column in SharePoint, with formula set to sum all the service costs
  • Placed the "SUMAMT" variable on top of it to display the calculation live on the form for the user
  • Converted the "TOTALAMT" to Float in MSFLOW to enable my condition to work (since Calculated columns are considered strings in MS FLOW.

Seems to be working fine; therefore I will be closing this as solved. 

Thank you, and to everyone who tried to help me with my issue - This is truly appreciated !!

@v-xida-msft @QJappie22 

Stay well 😃

 

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,713)