Skip to main content

Notifications

Dynamics 365 Community / Forums / Field Service forum / Create view of Work Or...
Field Service forum
Answered

Create view of Work Orders without certain products attached

Posted on by 45
To give an simple example:

How would one create a custom view of Work Orders that do not have any attached Work Order Products beginning in /CO -/?

If I added a related Work Order Product entity filter, and filter by Name does not begin with /CO -/ it will produce a list of Work Orders that have at least one product that does not begin with this, but not all of them.
Categories:
  • Verified answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Create view of Work Orders without certain products attached
    Hi,
     
    Unfortunately, this is not possible.
     
    The first condition presupposes that the related product exists, while the second condition presupposes that the related product does not exist. These two conditions are in conflict.

    You need to create a separate view for work orders that do not have related products.
     
    Best Regards,
    Dengliang Li
     
  • DAcustom555 Profile Picture
    DAcustom555 45 on at
    Create view of Work Orders without certain products attached
    Excellent! This worked, thank you.
     
    Last thing, is it possible to edit the XML to add one more condition? I tried to figure it out but I can't seem to get it.

    Adding OR logic to this:
    The same first filter (Work Orders with Work Order Products where name does not contain CO -
    OR
    Work Orders with no Work Order Products at all.
  • Suggested answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Create view of Work Orders without certain products attached
    Hi,
     
    You can modify the view using the XRMToolBox tools: View Designer and Fetch XMLBuilder.
     
    The FetchXML for the view is shown below.
    Returns all records that do not begin with the name CO -.
     
    In this way, work orders with mixed product name products do not appear in the view.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     
  • DAcustom555 Profile Picture
    DAcustom555 45 on at
    Create view of Work Orders without certain products attached
    Thanks for your response.

    My issue comes from when Work Orders have a mix of these.

    Let's say a work order a Work Order has a product that begins with CO - but also has one that begins with DO -

    This filter setup will still show this Work Order because there is at least one product that does not begin with CO -.

    I want to be able to identify Work Orders that do not contain any of these CO - products.
  • Suggested answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    Create view of Work Orders without certain products attached
    Hi,
     
    I may not have reproduced your problem.
    I attached three different products starting with /CO -/ to both work orders.
     
    I created two views.

    1.Work orders attached to products beginning with CO -
    Two work orders with products attached that begin with /CO -/ appear in the view.
    2.Work orders attached products that do not begin with CO -
    You can see that the two work orders with products attached that begin with /CO -/ do not appear in the view.
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me .
     
    Best Regards,
    Dengliang Li
     

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,623 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,463 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans