cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
saturation
Resolver I
Resolver I

D365/CDS Owner field on form?

I added the Owner field to a form that is working properly, but the data card says "Add Item from Insert Pane". If I select DropDown it just displays a sample list of numbers....How do I get this (or a better Input field) to display the Users (Owners) in it?

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @saturation ,

 

The owner field is a polymorphic lookups field in CDS, If you want to show the Owner on the form, please follow steps:

1. insert two labels into Owner Data Card, one is to show Owner Label, another one is to show the owner.

2. add Users and Teams entities into Data Sources

2. set the first label's Text property: Parent.DisplayName

3. set the second label's Text property: 

If( IsType( ThisItem.Owner, Users ), 
    AsType( ThisItem.Owner, Users ).'Full Name', 
    AsType( ThisItem.Owner, Teams ).'Team Name' )

 Result:

Snipaste_2020-04-14_09-39-54.png

Hope this helps

Sik

View solution in original post

3 REPLIES 3
saturation
Resolver I
Resolver I

In addition, I can add the Owning User or Owning Team fields as separate fields, but it appears we can't use 1 field for both as in D365. Maybe no viable solution at this time?

GarethPrisk
Resident Rockstar
Resident Rockstar

To confirm, you are using a model-driven application and form. Correct?

If you are using an entity which user-owned, instead of organization. You will only be able to add the Owner field to the form/header, and it will

  • Allow you search both Teams and Users
  • Only show a single Team or User at a time - the owner of the record

Although you have likely seen the OwningUser and OwningTeam attributes in the solution viewer, or canvas app studio, you cannot show these independently in a model-driven form/view/etc. That being said, there would be no advantage to doing so - since the record can only have a single owner at a time; either a User, or a Team.

 

Finally, you should be utilizing the Assign button primarily for updating the Owner field. While you can technically update the field via the lookup, there is a built-in mechanism which handles this type of update correctly. https://docs.microsoft.com/en-us/powerapps/user/assign-or-share-records

 

In my experiences, the UX for touching the Owner lookup is poor. You will either use the Assign To button, or dynamically set the owner using a synchronous workflow based on another updated. Example: when Territory changes, assign to the Territory Owner (Manager) dynamically.

v-siky-msft
Community Support
Community Support

Hi @saturation ,

 

The owner field is a polymorphic lookups field in CDS, If you want to show the Owner on the form, please follow steps:

1. insert two labels into Owner Data Card, one is to show Owner Label, another one is to show the owner.

2. add Users and Teams entities into Data Sources

2. set the first label's Text property: Parent.DisplayName

3. set the second label's Text property: 

If( IsType( ThisItem.Owner, Users ), 
    AsType( ThisItem.Owner, Users ).'Full Name', 
    AsType( ThisItem.Owner, Teams ).'Team Name' )

 Result:

Snipaste_2020-04-14_09-39-54.png

Hope this helps

Sik

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,744)