helpful-gold-75736
11/15/2024, 6:31 PMLogs:
AI Query generated successfully
{ query:
{ '$or':
[ { name: { '$regex': 'Doe', '$options': 'i' } },
{ name: { '$regex': 'Doe', '$options': 'i' } } ] },
generator: 'function (util, ...params) {
return {
// "find a contacts with name or lastname is Doe"
$or: [
{ name: { $regex: \'Doe\', $options: \'i\' } },
{ name: { $regex: \'Doe\', $options: \'i\' } }
]
};
}' }
{"scope":"table","tableName":"ContactsTable"}
**But when I'm trying to pass the same prompt with variable ex: @workflow.user_input
the query generated incorrectly and trying to find the prompt in the database instead of using it for conscruct a query.**
LOGS:
AI Query generated successfully
{ query: { '$text': { '$search': 'find a contacts with name or lastname is Doe' } },
generator: 'function (util, ...params) {
return {
// "{params[0]}"
$text: { $search: params[0] }
};
}' }
{"scope":"table","tableName":"ContactsTable"}