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

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

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