Multiple Where values in Mapping

Moderator: Support

Posts: 5
Joined: Tue Dec 01, 2020 3:41 pm

Multiple Where values in Mapping

Post by DeathgripVT »


I am trying to perform a mapping event for a DB query service. I need to have the query pull data where to_users._id (Column Name) = (Storage Variable) and profile (Column Name) = SelectedProfile (Storage Variable).

My current code within the TS of the "where" mapping (Attached screen shot):

var profile ="SelectedProfile");
var q = '{"$and":[{"to_users._id":"'+value+'"},{"profile":"'+profile+'"}]}';
return q;

I can't quite get the syntax to work properly. I do not get any errors but it also does not return anything.

Thank you,

issue2.PNG (34.53 KiB) Viewed 517 times
issue1.PNG (51.26 KiB) Viewed 517 times
Serhii Kulibaba
Posts: 144
Joined: Tue Aug 27, 2013 1:47 pm

Re: Multiple Where values in Mapping

Post by Serhii Kulibaba »


Please use a simple TS code here:

Code: Select all

const profile ="SelectedProfile");

return {"$and":[{"to_users._id": value},{"profile": profile}]};
Post Reply