WELCOME TO THE COMMUNITY
find what you are looking for or ask a new question
Home > Forum > Latest posts

latest posts

MVP
In reply to: Cezary Rzucidło

Hi!
I'm not into the topic but one think paid my attention. Of course, after every import you should change ID's on target enviroment but you can use process const. or global const.
In different way, maybe better will be use column from DB based on GUID ex. DTYPE_GUID?
Guid's are the same in every environment in the process so maybe it will help with changing ID's everytime.

@Katarzyna

Maybe I don't understand your case and I'm completely wrong.
What I understand is the following:
- You have a report which shows fields from the workflow and one item list. So the field values are repeated for each row in the item list for a given report.
- You want to create the sum of fields from another item list in another workflow instance
- This workflow instance is identified by the column Det_Att23 in the report and the WFD_AttChoose55 field in the workflow instance.

If this is true, I have no idea, how you could make this work.
This is a part from the executed SQL statement
FROM V_WFElements as wfelems /*TASKDETAILSJOIN*/ .... LEFT JOIN WFElementDetails on

There's no alias for the WFElementDetails which in turn will means that the Det_Att23 will be ambigues.


@Cezary
Do we have the option to select constants in reports? I did create an SQL function to return the value of a constant by it's Guid in the past to go around this problem.
I've also added the user voice to extend the V_WfElements with the GUIDs because of the issue you mentioned. Using Guids in calculated columns means additional work on the SQL server.

https://community.webcon.com/forum/thread/4134?messageid=4134

Best regards,
Daniel

MVP

Hi,

there's also an alternative using the "Additional path validation form rule".

In my example I created field which defines, whether a comment is necessary or not.
If this is true another form rule is executed. This form rule returns true or false depending on the value in the comment field. This form rule is of type JavaScript:
return document.querySelector("textarea[aria-label='Comments'").value ==''

If this returns false, an alert is displayed.

Remarks:
a) This solution will only work, if the comment is visible.
b) The part "textarea[aria-label='Comments'" may be different in your version. I'm using WEBCON BPS 2025
c) The false and true in the "Additional path validation form rule" will prevent or allow the path transition.

In your case you don't have the "Comment required" field but you could create one and set it to "technical" field. During the page load you could execute a form rule which sets the value of this field using a business rule.

Best regards,
Daniel

In reply to: Daniel Krüger (Cosmo Consult)

Hi,

is the provided SQL a part of an existing statement which is working?
At the moment this doesn't make any sense.

Regardless of my leg of understanding you could:
- Activate the diagnostic mode, load the report and check the executed SQL statement. This way, you can copy the statement and verify what's not working. You will need to add some line breaks to make it readable, but it will be worth it.
- Create data table mimicking the report and create the calculated column there. Ones the column is working you can copy it over to the report. You may need to amend /add the table alias which are used in report. You can get them from the diagnostic log.

That being said:
If you have multiple environments dev/test/prod in place, you will need to use the ids of the production environment. Since we can't use variables in the report you need you would need to correct it in the production environment after each transport of the application.
WFD_DTYPEID = '212'
and DE.DET_WFCONID = '5788'
and DE.DET_IsDeleted = 0
and WFD_STPID <> '935'

Depending on what you want to achieve it may be an option, that the completed subworkflow causes an update of the parent workflow which than stores the value you want to display in the item list.

Best regards,
Daniel

Hi!
I'm not into the topic but one think paid my attention. Of course, after every import you should change ID's on target enviroment but you can use process const. or global const.
In different way, maybe better will be use column from DB based on GUID ex. DTYPE_GUID?
Guid's are the same in every environment in the process so maybe it will help with changing ID's everytime.

In reply to: Daniel Krüger (Cosmo Consult)

Hi,

is the provided SQL a part of an existing statement which is working?
At the moment this doesn't make any sense.

Regardless of my leg of understanding you could:
- Activate the diagnostic mode, load the report and check the executed SQL statement. This way, you can copy the statement and verify what's not working. You will need to add some line breaks to make it readable, but it will be worth it.
- Create data table mimicking the report and create the calculated column there. Ones the column is working you can copy it over to the report. You may need to amend /add the table alias which are used in report. You can get them from the diagnostic log.

That being said:
If you have multiple environments dev/test/prod in place, you will need to use the ids of the production environment. Since we can't use variables in the report you need you would need to correct it in the production environment after each transport of the application.
WFD_DTYPEID = '212'
and DE.DET_WFCONID = '5788'
and DE.DET_IsDeleted = 0
and WFD_STPID <> '935'

Depending on what you want to achieve it may be an option, that the completed subworkflow causes an update of the parent workflow which than stores the value you want to display in the item list.

Best regards,
Daniel

Thank you very much for your response.
Yes, I already have a calculated column in the list of items in the form.
This column is of the type - calculated text value. The SQL works.
However, I am unable to display this column on the report

Hi,

I am not sure if it's possible using the regular comment section.
However, you can emulate its behavior using a multi-line text field.

Just enable the append mode in the field configuration.
By then adding a business rule to the requiredness restriction of the field you'll be able to toggle it.

In the example from my screenshot, I just check if any rows in the example table have the value true for a specific column, based on that rule the text field becomes mandatory.

MVP

Hi,

is the provided SQL a part of an existing statement which is working?
At the moment this doesn't make any sense.

Regardless of my leg of understanding you could:
- Activate the diagnostic mode, load the report and check the executed SQL statement. This way, you can copy the statement and verify what's not working. You will need to add some line breaks to make it readable, but it will be worth it.
- Create data table mimicking the report and create the calculated column there. Ones the column is working you can copy it over to the report. You may need to amend /add the table alias which are used in report. You can get them from the diagnostic log.

That being said:
If you have multiple environments dev/test/prod in place, you will need to use the ids of the production environment. Since we can't use variables in the report you need you would need to correct it in the production environment after each transport of the application.
WFD_DTYPEID = '212'
and DE.DET_WFCONID = '5788'
and DE.DET_IsDeleted = 0
and WFD_STPID <> '935'

Depending on what you want to achieve it may be an option, that the completed subworkflow causes an update of the parent workflow which than stores the value you want to display in the item list.

Best regards,
Daniel

hi,
I would like to create a calculated column for a report with a list of items.
This column, using SQL, should fetch data from another process. I want to map it based on the DET_Att23 ID for each row of the report::

select sum(DE.DET_Value2 - isnull(DE.DET_Value17, 0)) as nn
from WFELEMENTS
join WFELEMENTDETAILS DE on WFD_ID = DE.DET_WFDID
where WFD_DTYPEID = '212'
and DE.DET_WFCONID = '5788'
and DE.DET_IsDeleted = 0
and WFD_STPID <> '935'
and dbo.clearwfelem(WFD_AttChoose55) = DET_Att23

Should I replace DET_Att23?


Is it possible to add a calculated text value column of a list of items to the report?


Thankyou
Regards

Hi,

I have a problem with action "Update item list values" pointed on path.
Workflow is started automatically base on REST API and pointed to the same path.
I found information on the log "Number of replaced rows: 0' after start process by REST API.

When I use web to start process, action update item list values works fine.
When I edit a document created by REST API , action also works fine.

Best Regards
Tomasz

In reply to: Daniel Krüger (Cosmo Consult)

Hi,

if you get an invalid request response, the error is the body. In your case a double quote is missing at the end of the scope.

You can also omit the scope completely.

Best regards,
Daniel

Hi,

I added double quote, but still the same error in Postman.

{
"grant_type": "client_credentials",
"client_id": "XXX",
"client_secret": "XXX",
"scope": "HighTrust.Elements.ReadWrite.XXX"
}

I recived error:

{
"error": "invalid_request"
}

The solution was to use swagerr, enter a value in :

grant_type *
client_id *
client_secret *

I recived correct curl syntax, and import to Postman.

Best regards,
Tomasz