cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TrevorSDG
Level: Powered On

Can't update field with value of calculated text label

I have a fairly simple form that has a field to enter a user's e-mail (which functions for us as a "Property" such as "this hotel@mycompany.com") and from there it populates the label of another datacard  (OSM) with that user's manager's e-mail so it doesn't have to be looked-up or entered manually. The formula to get the managers's e-mail is

Default = Office365Users.Manager(Property_val.Selected.Email).Mail

and it works great. However, I can't get the update to take the value and update the SP list item with

OSM_txt.Text

What am I missing?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Can't update field with value of calculated text label

Hi @TrevorSDG ,

Could you please share a bit more about the "OSM" field in your SP List? Is it a Text type column or a Person type column?

 

1. If the "OSM" field is a Text type column in your SP List:

Please consider set the Update property of the OSM Data card in your Edit form to following formula directly:

Office365Users.Manager(Property_val.Selected.Email).Mail

 

2. If the "OSM" field is a Person type column in your SP List:

Please consider set the Update property of the OSM Data card in your Edit form to following:

{
  Claims: "i:0#.f|membership|" & Lower(Office365Users.Manager(Property_val.Selected.Email).Mail),
  DisplayName: Office365Users.Manager(Property_val.Selected.Email).DisplayName,
  Email: Office365Users.Manager(Property_val.Selected.Email).Mail,
  Department: "",
  JobTitle: "", 
  Picture: ""
}

 

Please consider take a try with above solution, check if the issue is solved.

 

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

3 REPLIES 3
Super User
Super User

Re: Can't update field with value of calculated text label

@TrevorSDG 

A few questions for you good sir!

What data type is the column OSM in SharePoint?

  • This should be a single line text field. 
  • It should not be a People field

What code have you used in the Update property of the Card?

  • I assume you are referencing the blurred out label called OSM_txt
  • Put this code in the Update property of the Card

 

OSM_txt.Text

 

What if your SharePoint field must be a People field?

 

{  
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
    Claims: "i:0#.f|membership|" & Lower(Office365Users.Manager(Property_val.Selected.Email).mail), 
    DisplayName: Office365Users.Manager(Property_val.Selected.Email).displayName,  
    Email: Office365Users.Manager(Property_val.Selected.Email).mail
}

 

Please try these initial suggestions.  If it does not work please take a screenshot with the left panel showing and highlighting the label.  Make sure the Update property is showing in the screenshot.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a"Thumbs Up."

 

Community Support Team
Community Support Team

Re: Can't update field with value of calculated text label

Hi @TrevorSDG ,

Could you please share a bit more about the "OSM" field in your SP List? Is it a Text type column or a Person type column?

 

1. If the "OSM" field is a Text type column in your SP List:

Please consider set the Update property of the OSM Data card in your Edit form to following formula directly:

Office365Users.Manager(Property_val.Selected.Email).Mail

 

2. If the "OSM" field is a Person type column in your SP List:

Please consider set the Update property of the OSM Data card in your Edit form to following:

{
  Claims: "i:0#.f|membership|" & Lower(Office365Users.Manager(Property_val.Selected.Email).Mail),
  DisplayName: Office365Users.Manager(Property_val.Selected.Email).DisplayName,
  Email: Office365Users.Manager(Property_val.Selected.Email).Mail,
  Department: "",
  JobTitle: "", 
  Picture: ""
}

 

Please consider take a try with above solution, check if the issue is solved.

 

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

TrevorSDG
Level: Powered On

Re: Can't update field with value of calculated text label

Thought I included the sp column types but missed it. Because the requirement was for it to be of type "people", I tried your line of code for updating the  "people" field in and it worked perfectly.

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,943)