WELCOME TO THE COMMUNITY
find what you are looking for or ask a new question
Home > Forum > Rules, JS, SQL

Rules, JS, SQL

Hi community! We want to add new row(s) to an item list due to customer requirement. This should be triggered on button click, that means on the client-side. Unfortunately I didn't find a way, to insert new row(s) to an item list in available JS functions. Does anyone know how to do that or could you provide some code samples? Thanks in advance & best regards, Nik

MVP

Hey everyone! Is there a way to keep line breaks (CR-LF) in the output of the SQL Command used in a Business Rule? I'm selecting values from DET_LongText1 which has line breaks. I'm attaching 3 images to show what I mean. 1. Webcon Form: What I see on the frontend. 2. Notepad++: What I see in Notepad++. 3. Output: What I see in the email if I output the value of the field with a Business Rule. I can't output the form field directly because it is coming from an Item List. Do you have a (...)

Is it possible to generate a QR code other than the database document ID in Webcon BPS? I used the action described below but it is not optimal for me. I have an action (javascript) that generates a QR code and puts it in an HTML attribute. The QR code is created from the value of the text attribute. I want to insert this QR code into the attachment created from the document process. HTML created in this way cannot be added to an attachment. I added an image type attribute, I can drag from H (...)

Hello, WebCon BPS user can specify substitutions on the portal. Does anybody know, where the data is stored in the SQL database? I'd like to create a weekly report with the data. We are on BPS Version 2021.1.4.55. Thank you! Cheers, Balint

Based on Daniels blog (https://daniels-notes.de/posts/2021/javascript-form-rule-execution-on-page-load#show-all-attachments-after-page-load) it is posible to open first attachments after page load but from all attachments tab (becouse attachment is in parent workflow)?

Hi all! We have to transfer some values from old database fields to new database fields, since we want to switch some fields in process to global fields. We plan to do this with well know T-SQL statement (UPDATE WFElements SET ...) within a cyclic action, which can be triggered on demand. Does anyone know if there are any restrictions in Webcon SaaS (Software as a service) regarding SQL UPDATE or is it allowed to do such thing? Thanks in advance & best regards, Nik

Based on Daniel post https://daniels-notes.de/posts/2021/retrieve-ps-variable-value I figure, it is posible to retrive output value from SQL Procedure? How force "Run sql procedure" action to log ouptut to [dbo].[WFLogs] table? Write-Output in PowerShell is logged to LOG_Description column. How log ouput from sql procedure?

MVP

Hello, I tried create sql script for created a global business rule with existing multiple global business rules . I tried use of multiple global business rule ( with parameters) in one global business rule (with parameters). Every global business rule used has parameters. The business rule that appeals to the other business rules has parameters that are mapped in the appealed rules. I get the error when I testing. I explained the error and showed the code in the attached image. Thank y (...)

Is there a option to insert values do database (my own table) by the button added in html form? My idea is like a picture I addend, but when I click on the button I get error Message=Error occured during rule SQL Dodaj powiązanie (Id: 136) evaluation. Source=WebCon.WorkFlow.Base StackTrace= at: Evaluation requested at: Evaluation node: Rule at: Evaluation node: SQL InnerException: Message=Error occured during rule SQL Dodaj powiązanie (Id: 136) evaluation. Source=WebCon.WorkFlow. (...)

Hi everyone! Am I blind or there is no function oposite to COLLECTION, that would remove an element from collection? How do you manage to overcome the lack of this function? I came up with an idea of making a JS form rule that takes a collection and removes a value given in one of the parameters. It works. But there are limitations that make the solution inelegant. First of all the form rule can not return a value (in opposition to business rules, but those however can not contain Javascript (...)

Hi everybody. I wonder if there is a way how I can attach the message sent by an "custom mail" action as new attachment to the workflow instance? Kind regards, KLaus

Hi, Does anyone else have problems with JavaScript rules not working in the mobile app? Is there any trick to it? Thanks

Hi, we have a column visibility/edit/requirement restriction for every field in an item list. But there is no column visibility restriction for the delete button, so you cannot prevent deletion of some rows. It is something you can do easily with js, but only with classic display form mode. It doesn’t work with modern forms. The problem is that it is not guaranteed that your form rules “Main form -> Behavior-> forms rule to be executed on page load” are being executed AFTER the page has been (...)

Hello, I personally like immediate validation – right after the user checks/selects/enters something on the form - much better than validation on an action. So usually I validate fields “on value change” and set the field error if necessary. Currently I use a js-function like this to showing/remove the error message (form display mode: Modern on BPS portal): function showError(columnName, hintText) { let errorLines = $("#" + columnName + " .attributeErrorsPanel li"); if (errorLines (...)

We have to iclude the Google Tag Manager into the Head and Body of the generated Webcon site of a dashboard. Including into the body seems to be possible via a HTML field. But we seemingly have no option to put it into the page header. Does anyone have any experience with Google Tag Manager and Webcon?

Hi All we have a large report build in one of our processes (list of all invoices which contains >350k items) which is now not loading for users. we have rebuilt it in SOLR and it is fast like TGV train but we had some calculated columns based on item lists which we need to rebuild. Is there any manual, KB article that describes this or anyone having expierience?

Hi there, I have a data source of MSSQL type, that populates a data table. The SQL query is quite complicated but it works. However it currently takes about 33 seconds to complete. Thus when executed in SQL Studio, I get the output table. When I try to execute it in a bps process, it fails. When testing in Designer Studio, I get an error of execution timeout. Is there a way to tell Webcon to allow a little more time for this sql? Michal

Hello, I'm wondering is there a simple way to do this. Sometimes "SQL COMMAND" returns nothing (there are no rows that match the query). How do you test for this? IF "SQL COMMAND [...]" = EMPTY does not seem to work. Maybe there is a workaround?

MVP

Hi everyone, does anyone have an idea whether it's possible to retrieve the users to whom a task will be assigned in the next step? What I've tested so far: - Verified that the variable 'System fields\Assigned persons' contains the current persons during path transition, exit and entry. - Created an SQL statement which returned the latest row from WFElementTasks, and executed this in an action during path transition, exit and entry. They all returned the old row. - SDK object RunCustomActionPa (...)

Hi all, I'm having a problem in Studio with a Form Validation rule using SQL. I have an item list that is populated with lines if the user select a Sales Order in another field or manually filled if there is no information on the SO. There is a column that is mandatory to be filled whenever the item list has any rows and I tried many examples to construct a validation form rule in order to have information on that column. I was using a SQL query because: - Column cannot be required (...)