Powered by
function formatInputs(input) { // Split the inpu...
# 💻developers
i
icy-river-21549
12/27/2024, 10:26 AM
function formatInputs(input) { // Split the input by commas, trim whitespace, and wrap each part in single quotes const formattedInputs = input .split(',') .map((item) => '${item.trim()}') .join(', ') return formattedInputs } // Example usage const userInput = workflow.accountnumber workflow.accountnumber = formatInputs(userInput); const jsonQuery = { query: Select count(*) as Sum from AccountsMaster where AccountNumber = ${workflow.accountnumber} }; workflow.query = JSON.stringify(jsonQuery); i m using this code iin execute code and after i pass the workflow.query to HTTP API for calling and i will do witjh 13 api calling only change the sql query i got this error: It working fine in emulator but in publish it give error
https://cdn.discordapp.com/attachments/1121494527727902891/1322148567992897577/botpress_publish_issue.png?ex=676fd24e&is=676e80ce&hm=7f654d24a0f1d0ddf6162c3dd48ba7dbd6c03ba485e67d72429e87bb091efcc0&
https://cdn.discordapp.com/attachments/1121494527727902891/1322148568290689155/botpress_api_issue.png?ex=676fd24f&is=676e80cf&hm=438403ff243dac5fb394ca1b77a886146fd5ce7c7eb14075df9f31a108502d73&
2
Views
Previous
Next