Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Fetch XML Builder: IN Operator with a lot of values

(0) ShareShare
ReportReport
Posted on by 355
Hello,




Within FetchXML Builder, I want to retrieve the records based of a field value specified inside an excel file.
I'll use these records for a bulk update.


Inserting multiple values inside the "Value" while using the IN operator is not immediate, as you have to add a comma to each one and put them on a single line.

But what if I have hundreds of values inside the excel file?


Is there a way to overcome this issue?





These are the steps I am doing:



-   I opened Bulk Data Updater and then went to FetchXML Builder to create my query and retrieve the records I wanted to update.



-    To create the filter for the name, what I suppose to do is entering the following values in a single line, separated by a comma:


                    pastedimage1656427366306v1.png






-    I have copied these names from an excel file (I am using a sample here, but in a real-life scenario, I may have 100+ records):



                           pastedimage1656427479323v2.png





-  I selected all the names, copied and put them on a single line, and added a comma to separate them manually for each record.


           pastedimage1656427762241v3.png




Is there a fastest/easy way to achieve my goal?



  • Verified answer
    - Matt Bayes - Profile Picture
    890 on at
    RE: Fetch XML Builder: IN Operator with a lot of values

    Hey Joel,

    I've actually had a similar requirement before, and we had something like 1000 records I needed to filter on.

    In order to achieve this, we started with an Excel file and used the CONCAT function to build our comma-separated list.

    Here's a screenshot of an example:
    Excel_5F00_ConcatCSV.PNG

    Based on this screenshot did the following:

    • Put all of our values we wanted in column A
    • In column B, row 1, we set this as =A1
    • In column B, row 2, we used the function =CONCAT(B1, ",", A2)
    • What this function does is concatenate the value in B1 with the value in A2 and puts a comma in between them. When we drag this formula down the column to the ending row, it will automatically pickup the next values in the list and build it dynamically.

    If you do have a lot of rows, this could become very slow as you approach the last row, but in your case I think 100 items wouldn't be so bad.

    If you have questions don't hesitate to reach out!

    Thanks!

    Matt Bayes

  • Joel D Profile Picture
    355 on at
    RE: Fetch XML Builder: IN Operator with a lot of values

    Hello,

    Thank you for your comment.

    I have the same issue with using this method, as the tool doesn't let me add multiple values simultaneously.

    I need to add multiple values at once, even if they are in separate lines, without commas.

  • Ossama Profile Picture
    3 on at
    RE: Fetch XML Builder: IN Operator with a lot of values

    Hi,

    Could you try to add them in separated node within FetchXML Builder like the below:

    2783.Untitled1.png

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 78 Super User 2025 Season 1

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 72

Overall leaderboard

Product updates

Dynamics 365 release plans