Share

 

Here is a simple function for constructing CAML Query if you have an array of strings. It is particularly helpful if the number of values(ie array length) is not constant.

 

PHP1

 

If you want to create dynamic CAML query in JS, you can use below methods:

Helper method:PHP2

 

PHP3

 

PHP4

 

PHP5

 

PHP6

 

Posted By-

Satyam Kumar

 

Disclaimer: Developer’s Corner Section of ISHIR blog is contributed and maintained by independent developers. The content herein is not necessarily validated by ISHIR.

 

About ISHIR:

ISHIR is a Dallas Fort Worth, Texas based AI-Native System Integrator and Digital Product Innovation Studio. ISHIR serves ambitious businesses across Texas through regional teams in AustinHouston, and San Antonio, supported by an offshore delivery center in New Delhi and Noida, India, along with Global Capability Centers (GCC) across Asia including India, Nepal, Pakistan, Philippines, Sri Lanka, and Vietnam, Eastern Europe including Estonia, Kosovo, Latvia, Lithuania, Montenegro, Romania, and Ukraine, and LATAM including Argentina, Brazil, Chile, Colombia, Costa Rica, Mexico, and Peru.