Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

Create view of Work Orders without certain products attached

Posted on by 55
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.
  • 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 55 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 55 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
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans