cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amoshe2
Helper III
Helper III

Patch specific employee name to a person field based on other datacardvalue

Hi,

Is there an option to Patch specific employee email value depend on other field in the form to a people picker value?
That mean that the people picker/Person field is still kept as a choice option(pick other employees) unless specific value is picked for other datacardvalue

Thanks
Almog

3 REPLIES 3
v-yujincui-msft
Community Support
Community Support

Hi @amoshe2 ,

 

Do you want to patch the value of the Person field based on the employee's name or email address?

I have made a test for your reference.

 

1. Here is my SharePoint List.

vyujincuimsft_1-1643097026685.png

2. Select the ComBo Box Control in the Employee_DataCard and apply the following formula on its DefaultSelectedItems property as:

If(!IsBlank(DataCardValue13.Text),
        {//Query person by employee email address
           '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
           Claims: "i:0#.f|membership|" & First(Office365Users.SearchUserV2({searchTerm:DataCardValue13.Text}).value).Mail,
           Department: "",
           DisplayName: First(Office365Users.SearchUserV2({searchTerm:DataCardValue13.Text}).value).DisplayName,
           Email: First(Office365Users.SearchUserV2({searchTerm:DataCardValue13.Text}).value).Mail,
           JobTitle: "",
           Picture: ""
        },
        {//Query person by employee name
           '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
           Claims: "i:0#.f|membership|" & First(Office365Users.SearchUserV2({searchTerm:DataCardValue12.Text}).value).Mail,
           Department: "",
           DisplayName: First(Office365Users.SearchUserV2({searchTerm:DataCardValue12.Text}).value).DisplayName,
           Email: First(Office365Users.SearchUserV2({searchTerm:DataCardValue12.Text}).value).Mail,
           JobTitle: "",
           Picture: ""
        }
)

3. Add an Icon Control and apply the following formula on its OnSelect property as:

SubmitForm(Form3)

Result Screenshots:

vyujincuimsft_2-1643098063372.png

vyujincuimsft_3-1643098128063.png

vyujincuimsft_4-1643098219214.png

 

Best Regards,

Charlie Choi

Let me clear my question again :

I need that the person field will popup automatically based on other datacardvalue 

 

When I select the option "Legacy Product Request" on the Request Type datacardvalue that the PDP Owner datacardvalue will show as "PDP Legacy Products@intel.com" and If selected "Current Products Request" on Request type data card than that the PDP owner field will be kept to be as choices field - hope that now I clear my question 

I have attached pic below for my fields 

 

Thanks 

Almog

Capture.PNG

I have more clear my question now , can you please advise on this 

Thanks 

Almog 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,683)