Skip to main content

Notifications

Announcements

No record found.

How to sort results by total available time when searching for resource availability

When using the Schedule Assistant to look for available resources to schedule a work order or fulfill a requirement, you can sort the resources displayed to find the best matching resource. Out of the box, the sorting can be done on one of these fields:

  • Name
  • Rating Value
  • Total Available Time

On the Schedule Assistant, this sorting can be applied in two ways:

  1. Use Sort on the header of the Schedule Assistant; -OR-
  • Use Sort Result byfilter on the available filters

The sort order is applied whether you select from the Sort dropdown list or the Sort result by filter.

Screenshot showing default sortingScreenshot showing default sorting

What if you want to default a specific sorting on Schedule Assistant? For example, let’s say you’re sorting your resource recommendations on the Schedule Assistant in descending order of Total Available Time on all your searches. It would save time to set the default to sort by descending order of Total Available Time of the resources.

Here is how to set the default the sort order on the Schedule Assistant.

  • Open the Schedule Board, any tab would do, click on the Schedule Board Settings (gears icon) as shown below

Default Sorting Screenshot 2Default Sorting Screenshot 2

  • Scroll down to the Schedule Types section. If you want to change the default for a specific schedulable entity, select that entity (for example, Work Order or Project). If you want to change the default, select None under Schedulable Types. Then modify the Default Retrieve Constraints query by selecting the edit button next to the query.You can now modify your retrieve constraints query.

Default Sorting Screenshot 3Default Sorting Screenshot 3

Default Sorting Screenshot 4Default Sorting Screenshot 4

Default Sorting Screenshot 5Default Sorting Screenshot 5

 

  • Add the below UFX query snippet to the Default Retrieve Constraints query, and save the record query. (Notice that you cannot actually override the default query we ship, but you can save as, which clones the default and lets you modify the query.)

<!– order by descending total available time –>
<Orders ufx-type=”list”>
<bag>
<name ufx-type=”string” ufx-formatvalue=”totalavailabletime”>totalavailabletime</name>
<descending ufx-type=”bool” ufx-formatvalue=”true”>true</descending>
</bag>
</Orders>

  • Once you save the query, make sure it now shows as the selected default query, and then apply your changes:

Default Sorting Screenshot 6Default Sorting Screenshot 6

  • Next time you search for availability, the Resources are sorted in the descending order of their Total Available Time

Default Sorting Screenshot 7Default Sorting Screenshot 7

Check out these blog posts to find more details about Total Available Time and UFX

Vinay Nalam

Program Manager, Dynamics 365 Engineering

The post How to sort results by total available time when searching for resource availability appeared first on Microsoft Dynamics 365 Blog.

Comments

*This post is locked for comments