Use Cases & Code Samples

Custom Web Form Sample

CustmForm_JSClientAPI_Sample.txt
13KB
Text
A Custom Form Basic Sample Usage Of JS Client API

Concatenating Filters

if you need to use the filter object for the <resource>.search function - you can use the below helper function to build your filter nodes easily:
1
function concatFilters(f1, f2, and) {
2
return {
3
"Operation":(and ? "AND" : "OR"),
4
"LeftNode":f1,
5
"RightNode":f2
6
};
7
}
Copied!
now call the function and build your filter object:
1
var uuids = // your attachments in an array
2
var filter = { "Operation":"IsEqual", "ApiName":"UUID", Values:[uuids[0]] };
3
for (var i = 1; i < uuids.length; i++) {
4
filter = concatFilters(filter,
5
{ "Operation":"IsEqual", "ApiName":"UUID", Values:[uuids[i]] });
6
}
Copied!
Last modified 1yr ago