Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8751619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:04:57+00:00 2026-06-13T13:04:57+00:00

I’ve asked a similar question before here and the answer solved my problem. However,

  • 0

I’ve asked a similar question before here and the answer solved my problem. However, now I’m getting the same problem as before but the answer doesn’t work anymore due to change in conditions.

Here’s the query I’m running. I’ve checked that someField is set to something (it’s a look-up field referring to an other entity by a guid). I get no entries in result (unless I switch the condition to “not equal”). That’s probably due to the fact that the field isn’t brought in.

When i breakpoint the execution and check Attributes, I see 21 fields out of a total of 30 (some of them might be empty, sure, but this one, i.e. someField, is not) but the one I’m interested in, isn’t there!

QueryExpression query = new QueryExpression
{
  EntityName = "entity",
  ColumnSet = new ColumnSet{ AllColumns = true },
  // Here I tried the code addition #1 below
  Criteria =
  {
    Filters =
    {
      new FilterExpression
      {
        Conditions =
        {
          new ConditionExpression("someField", ConditionOperator.Equal, guid)
        }
      }
    }
  }
};
// Here I tried the code addition #2 below
EntityCollection result = Service.RetrieveMultiple(query);

What do I miss and how can I resolve it?

I tried using LinkEntities as discussed in this blog but it didn’t really work out. I’m not even sure if it was a meaningful approach. It looked as follows.

  LinkEntities =
  {
    new LinkEntity
    {
      Columns = new ColumnSet { AllColumns = true },
      LinkFromEntityName = "entity",
      LinkFromAttributeName = "otherEntityId",
      LinkToEntityName = "entity2",
      LinkToAttributeName = "entity2Id"
    }
  },

I also tried to employ the solution suggested on MSDN. The same result.

request.LinkEntities.Add(
  new LinkEntity(
    "entity", "entity2", "otherEntityId", "entity2Id", JoinOperator.Inner));
request.LinkEntities[0].Columns.AddColumns("entity2Id");
request.LinkEntities[0].EntityAlias = "blobb";

Once again – the solution provided by @JamesWood isn’t working anymore, since I’ve got the administrator access and the regarded field is not empty.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:04:59+00:00Added an answer on June 13, 2026 at 1:04 pm

    I believe the issue here is in your FilterExpression and/or the actual data itself.

    From what you have said here:

    I get no entries in result (unless I switch the condition to “not
    equal”)

    When you set the filter to “equal”, nothing is equal to that Guid so you get no results.

    When you set the filter to “not equal”, everything is not equal to that condition so you start getting some results. When you do get results the lookup is not included because it is null the record (and hence why the “equal” filter doesn’t work).

    As I’m not certain about the exact issue I suggest taking these steps:

    1. For that record type, delete all the records.
    2. Make one new record, populate the lookup field.
    3. Write a query that returns all fields from that entity (e.g. AllColumns = true) without specifying a FilterExpression.
    4. This query should give you one result, inspect the attributes collection to make sure the lookup is populated (check all the attributes to make sure you haven’t just got the wrong name).
    5. Then extend the query to have a FilterExpression.

    There is an example of filtering with a lookup here.

    As a side note; you don’t actually have to specify in the ColumnSet columns you are going to use for filtering.

    E.g. in SQL you could do:

    SELECT firstname FROM contact WHERE lastname = 'wood'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This could be a duplicate question, but I have no idea what search terms
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I've tracked down a weird MySQL problem to the two different ways I was
I don't have much knowledge about the IPv6 protocol, so sorry if the question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.