Please complete the details below then remove this line:
Volt MX Version: 9.52
**Operating System:**Win11
Database (if appropriate): SQLServer / MongoDB
Server: Tomcat
Problem/Query:
I’m trying to query a MongoDB database, but I don’t know where or how to send the CollectionName instruction. In my function below, I get an error saying that the CollectionName key is required:
login: function(){
var self = this;
function INVOKE_SERVICE_j9600a3726f145db9ec89dd9d9890187_Callback(status, MongoDocument_get) {
voltmx.application.dismissLoadingScreen();
}
voltmx.application.showLoadingScreen(null, null, constants.LOADING_SCREEN_POSITION_FULL_SCREEN, true, true, {});
if (MongoDocument_get_inputparam == undefined) {
var MongoDocument_get_inputparam = {
options: {}
}; }
var odataParams = ;
var select = ;
select.push(“CollectionName eq ‘usuarios’”);
select.push(“email eq '”+self.view.Login.txtUserName.text+“'”);
select.push(“eq password '”+self.view.Login.txtPassword.text+“'”);
select = select.join(" and ");
select = “$filter=” + select;
MongoDocument_get_inputparam[“options”][“odataurl”] = select;
MongoDocument_get_inputparam[“serviceID”] = “usuariosDB$MongoDocument_get”;
var MongoDocument_get_httpheaders = {};
MongoDocument_get_inputparam[“httpheaders”] = MongoDocument_get_httpheaders;
var MongoDocument_get_httpconfigs = {
timeout: 30
};
MongoDocument_get_inputparam[“httpconfig”] = MongoDocument_get_httpconfigs;
usuariosDB$MongoDocument_get = mfintegrationsecureinvokerasync(MongoDocument_get_inputparam, “usuariosDB”, “MongoDocument_get”, INVOKE_SERVICE_j9600a3726f145db9ec89dd9d9890187_Callback);
}