Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

The value passed for ConditionOperator.In is empty"

(0) ShareShare
ReportReport
Posted on by 392

Hi All,

Can someone with better experience please help. I am trying to add a filter to the "Optionalattendees" field in appointment entity, the guid I am passing from webApi retrieve is saying the value passed is empty, but my webApi actually returns back 32 records. What I'm I doing wrong, my code is below :

function AppointmentOptionalAttendeesLookup(formContext) {

       Xrm.WebApi.retrieveMultipleRecords("systemuser", "?$select=systemuserid").then(
           function success(result) {
          var userId = [];

           for (var i = 0; i < result.entities.length; i++) {
                 userId.push(result.entities[i].systemuserid);
                 //userId++;
                 }
          if (userId.length > 0) {
             formContext.getControl("optionalattendees").addPreSearch(function () {
                   var filter = "<filter>" +
               "<condition attribute='systemuserid' operator='in' value='" + userId + "'/></filter>";
               formContext.getControl("optionalattendees").addCustomFilter(filter);
               });
     }
},
function (error) {
console.log(error.message);
return

});
}

The UserId is being passed. Cheers

  • aabueid Profile Picture
    aabueid 5 on at
    RE: The value passed for ConditionOperator.In is empty"

    what was the issue ?

  • Tadhg Profile Picture
    Tadhg 75 on at
    RE: The value passed for ConditionOperator.In is empty"

    Hi Boss, would you mind posting your code?

  • Verified answer
    Victor Onyebuchi Profile Picture
    Victor Onyebuchi 392 on at
    RE: The value passed for ConditionOperator.In is empty"

    I have resolved this issue, if you need the code, reply back.

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans