web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Field Service forum / Schedule Board: Add cu...
Field Service forum

Schedule Board: Add custom LIKE filter to new field

(0) ShareShare
ReportReport
Posted on by 20

Hi, I have customized the Schedule Board and added some fields and filters. I didn't have issues with combo-boxes or date filters, but interestingly enough, I'm having issues with a LIKE filter. 

I have added a new text field to my filters area, here's a simple screenshot including only this field I called "Search Box":

4113.1.PNG

The idea is that the user enters any text in this text-box and my UFX query applies a LIKE to 2 or more fields. In this case, I'm having trouble with even one field. I added this field to the Scheduler:

<attribute name="fig_routenumber" alias="fig_routenumber" groupby="true"/>

This field is a custom field added to the Bookable Resource entity. So I would like to perform a LIKE operation to this new field:

<filter type="and">
<condition attribute="fig_routedate" operator="eq" ufx:if="$input/routedate">
<ufx:value select="$input/routedate" attribute="value" />
</condition>
<condition attribute="fig_routenumber" operator="like" ufx:if="$input/searchbox">
<ufx:value select="$input/searchbox" attribute="value" />
</condition>
</filter>

This filter does not seem to work. It seems to work as an EQUAL instead of a LIKE, and once I clear the SearchBox field, it just doesn't return anything, instead of clearing out the filter it keeps executing an EQUAL to an empty string and I get an empty board:

0564.2.PNG

So basically my question is: How do I add a LIKE operator filter properly? 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    Thomas David Dayman Profile Picture
    11,323 on at

    have you tried adding the wildcards to your search? %word%

  • chrams Profile Picture
    20 on at

    Actually no, but where would I add those? Does the UFX syntax allow wildcards?

    If I was writing a FetchXML statement it would be with those wildcards. but in this case I don't know where to add them. According to this site:

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/common-scheduler/developer/universal-fetchxml

    Without the wildcards, the UFX query should be translated into the correct FetchXML with wildcards:

    8611.3.PNG

    The above code doesn't really work for me.

    Is there a way to see the exact FetchXML statement being executed from the Schedule Board?

  • chrams Profile Picture
    20 on at

    I re-read your answer and you are absolutely right, by adding the wildcards to the search box it works (to some extent):

    2234.5.PNG

    Still seems a bit weird that I need to tell the users to use wildcards for their searches. But I guess I can live with that. Any idea how I can fix this when the search box is empty:

    2234.5.PNG

    I have to tell them to put "%" on their search every time? It seems a bit weird to me that this is the only way around this.

    Thanks!!

  • Thomas David Dayman Profile Picture
    11,323 on at

    Its because you can specify a few terms like so:

    Resources that end in 123 - %123

    Resources that starts with 123 - 123%

    Resources that contain 123 - %123%

  • devwork Profile Picture
    59 on at

    Hi,

    I have a requirement to add text field within the Filter layout on Schedule Board. I wanted the syntax for adding text field control within “Filter Layout” query on schedule Board.

    Can you assist me with the Filter Layout Query?

    Thanks,

  • Casperhartz Profile Picture
    35 on at

    Did you find a solution where there is no need of the "%"? For me, it also seems like a ekstra step :)

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Field Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans