I attempted to get a lookup value in an email body, however it came through as the Id of the lookup value.

I tried to create a text process parameter and use a formula: [#Read PCR Data.First item of resulting collection.PCR Change Type#].ToString()

I expected the result to look like thisL reason: "Proactive Break/Fix"

however the result looked like this: reason: "ec15074d-4b35-4191-ae85-5bf01144101a"

How can I get the text value instead of the id?

Like 0

Like

2 comments

Mitch, 

You will have to read the lookup within the PCR Data, in your example not only do you have to "Read PCR Data" but you should also read the "PCR Change Type" lookup (in another element) which is in the object you are already reading.



The filtration will be something like 'ID = Read PCR Data.PCR Change Type'.



Extra** The reason you got your result (and why it is still technically true) is because you are only reading the UID value of the lookup and not the Name value - there is some magic that happens to connect the UID.Name in the view. So what your code is doing is casting the UID 'type' to string 'type'.



Hope this helps!

Philip Wierciszewski,

Perfect! thanks so much!

Show all comments

Hello. I have two critical ideas for improving Parameter selection for example in Email Templates, especially the Macros.

Ability to JOIN datatypes on reverse relation.

Example: I am working with Email Template of type Order. I have no chance to included products of the order because the relation is this:

Order <-- Products in Order <-- Product

If u had ability to join Products in Order on OrderID and then Product on ProductID I could show it.

SQL Code would be:

SELECT * FROM Order
JOIN Products in Order AS PiO on PiO.OrderID = Order.OrderID
JOIN Product on Product.ProductID= PiO.ProductID

 

Then I could use the other tables data through join. Currently this is not possible as far as I can tell.

We should be able to join everywhere in bpm'online where we use the parameter-menu:

However it is possible to do JOIN on Printable tables and on Details:

 

To summarize: I can have foreign table data shown on Details and Printables. But not for example in Email Template. I believe this is very important

3 comments

I can get a Table of my Products and Products in Order when setting up a Detail or a Printable Table. I need to be able to do the same with Email Template > Macros

Hi Julius,

Totally support the idea. We are having this need in nearly every project and allways have to find a workaround.

Rgds,

Luis

Hello Julius!

We have already registered a query for our R&D team to implement this functionality. Thank you for the suggestion!

Best regards,

Bogdan

Show all comments

Processes that are designed to be used as sub-processes can become confusing because Parameters appear in alphabetical order and have no indication of which are required as inputs.  It would be helpful to have an additional checkbox setting for Required or Input in the parameter set up, especially when a process is designed to be used as a sub-process by different teams creating processes.

2 comments

Dear Janine,

You can use an auto-generated page at the begining of the business process with full list of all parameters and you can specify if the field is required to fill in in this auto-generated page (see screenshot http://prntscr.com/n5tita). And you can also change the position of those parameters in an auto-generated page using "Move up" and "Move down" options. And after that you can use those parameters in next steps of a business process.

Best regards,

Oscar

There are two problems with this suggestion.

1) This doesn't help for processes that are designed as subprocesses.  There is no indicator for others teams creating processes based on the processes I'm creating what parameters are input and output parameters without external documentation.

2) Mobile is not very manual start process friendly.

I would rather have a checkbox to enable a star on the parameter when the process is used as a subprocess than have to change the names of parameters to read differently.

Show all comments

Parameters of a process appear in creation order in the process or alphabetical order as a sub-process, which can become unwieldy or confusing when referencing subprocesses since there is no way to indicate which ones are required to be passed into a process to function correctly.  Is there any way to sort the Parameters manually, for example, so that inputs parameters are at the top of the list?

Like 0

Like

1 comments

Dear Janine,

Currently the logic is that parameters in the process are ordered by creation date (if we are talking about custom business processes). And indeed they cannot be sorted in another order and I will create a request to our R&D team so they could include this functionality in out of the box version of the application. Thank you for this idea!

Best regards,

Oscar

Show all comments

How do I test if a String Parameter in a process has not been filled in using a Formula?  For example, the following are not working because they do not evaluate to true when the parameter is not filled in:

[#MyStringParameter#]==""
 
[#MyStringParameter#]==String.Empty

Is there a function for String length?

Like 0

Like

2 comments

I've used the following: 

string.IsNullOrEmpty([#MyStringParameter#])

However, I believe I've used what you're using as well (but might have wrapped it in parentheses)

Ryan Farley,

String.IsNullOrEmpty([#MyStringParameter#]) works.  Thanks!

Show all comments

Hi Community,

 

Is there a way to pass parameter from business process back to my edit page.

Like 0

Like

1 comments

Hello community



I am working with a business process using the process element [Call Web Service].

The web service configuration and the call are working correctly.

The JSON response is similar to:

{

"$ totalResults": 2,

"$ startIndex": 1,

"$ itemsPerPage": 100,

"$ resources": [

     {

      "$ clave": "t6UJ9A000001",

      "$ Static_state": 200,

      "$ etag": "Yi4EmiUg3xw =",

       "Account": {

             "$ clave": "A6UJ9A0001RU",

             "$ uuid": "00000000-0000-0000-0000-000000000000",

           }

      },

      {

      "$ clave": "t6UJ9A00000B",

      "$ Static_state": 200,

"$ etag": "wMpPUtrfgdA =",

"Account": {

"$ clave": "A6UJ9A0001RX",

"$ uuid": "00000000-0000-0000-0000-000000000000",

}

}

]

}



My goal is to iterate the JSON and finally create tickets in BPM with the source information.

Using a pre-configured page I was able to determine that the parameter where the information is returned is [#WS Step.Response body #]

How can I take this value in a Script Task and process the JSON? or what is the correct procedure to do this?

Previously I should be able to take the value of the parameter [#WS Setp.Success #] to determine if the execution was successful

Thank you!

Good weekend

Like 0

Like

1 comments

get/set a parameter value in a business process script task

var parameter1 = Get<Guid>("Parameter1");

Set("Parameter2", parameter1.ToString());

var parameter2 = Get<string>("Parameter2");

get object of type UserConnection

var userConnection = Get<UserConnection>("UserConnection");

Show all comments

Hello!

how are you?

I hope your can help me!

I have a button in EmployeePage, when I press the button call to method "downloadFile" in property "click". I want call to this method from various bottons but passing a distinct parameter for each button. Example:

{
		"operation": "insert",
		"name": "DownloadFileButton",
		"values": {
			"itemType": 5,
			"imageConfig": {
				"bindTo": "Resources.Images.FilesImage"
			},
			"click": {
				"bindTo": "downloadFile"
                //Pass parameter
			},
			"visible": true
			"enabled": {
				"bindTo": "UsrClaveAltaTemprana"
			},
			//Button Tooltip
			"hint": {  
				"bindTo": "Resources.Strings.MensajeTooltipDownload" 	
			},
			"markerValue": "DownloadFileButton",
			"layout": {
				"colSpan": 1,
				"rowSpan": 1,
				"column": 11,
				"row": 0
			}
		},
		"parentName": "Taba317b6dcTabLabelGridLayout3826b978",
		"propertyName": "items",
		"index": 1
	},
{
		"operation": "insert",
		"name": "DownloadFileButton2",
		"values": {
			"itemType": 5,
			"imageConfig": {
				"bindTo": "Resources.Images.FilesImage"
			},
			"click": {
				"bindTo": "downloadFile"
                //pass parameter
			},
			"visible": true
			"enabled": {
				"bindTo": "UsrClaveBajaTemprana"
			},
			//Button Tooltip
			"hint": {  
				"bindTo": "Resources.Strings.MensajeTooltipDownload" 	
			},
			"markerValue": "DownloadFileButton2",
			"layout": {
				"colSpan": 1,
				"rowSpan": 1,
				"column": 11,
				"row": 1
			}
		},
		"parentName": "Taba317b6dcTabLabelGridLayout3826b978",
		"propertyName": "items",
		"index": 1
	},
//method
methods: {
//method with parameter
			downloadFile: function(parameter) {
             var p = parameter;
             if (p == "A")
               //do some thing
             else
               //do some thing
            }

I appreciated your help!

King Regards!

Ezequiel Gómez

Like 0

Like

4 comments

Dear Ezaquiel,

The code you've provided above will work in case you add the appropriate Set parameter to UsrClaveAltaTemprana and UsrClaveBajaTemprana.

We suggest you to add the virtual attribute ,though. You can find the example of the attribute in various schemas in the configuration. 

Lisa

Hello,

 

I have exactly the same request, but I don't understand the answer.

Can you explain this in a little more detail?

 

How can i pass a parameter to the downloadFile 

"click": {

                "bindTo": "downloadFile"

}

Hi Oliver, how are you? Below an script example. Let me know if it work for you:

{

                "operation": "insert",

                "name": "downloadTest",

                "values": {

                    "itemType": 5,

                    "imageConfig": {

                        "bindTo": "Resources.Images.IconoDescargar"

                    },

                    "click": {

                        "bindTo": "downloadTest"

                    },

                    "visible": {

                        "bindTo": "UsrdownloadTest"

                    },

                    "hint": {

                        "bindTo": "Resources.Strings.MensajeTooltipDownload"

                    },

                    "layout": {

                        "colSpan": 1,

                        "rowSpan": 1,

                        "column": 18,

                        "row": 6

                    }

                },

                "parentName": "Tabe14d1848TabLabelGridLayout4868277b",

                "propertyName": "items",

                "index": 25

            }

//////////////////////**////////////////////////////////////////

downloadTest: function() {

                var esqEmpDocument = this.Ext.create("Terrasoft.EntitySchemaQuery", {

                    rootSchemaName: "UsrEmployeeDocument"

                });

                esqEmpDocument.addColumn("Id", "IdDocumento");

                esqEmpDocument.addColumn("Name", "NombreDocumento");

                //Filtro por Empleado

                var filtroEmpleado = esqEmpDocument.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "UsrEmpleado.Id", this.get("Id"));

                //Filtro por Id de empleado

                var filtroTipoDoc = esqEmpDocument.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "UsrCodDocumento", "MA");

                //Agrego filtros a la consulta

                esqEmpDocument.filters.add("filtroEmpleado", filtroEmpleado);

                esqEmpDocument.filters.add("filtroTipoDoc", filtroTipoDoc);

                esqEmpDocument.getEntityCollection(function(result) {

                    if (result.success) {

                        result.collection.collection.items.forEach(this.descargar);

                    }

                }, this);

            },

            

            descargar: function(item) {

                var idDoc = item.values.IdDocumento;

                var nombreDoc = item.values.NombreDocumento;

                //this.showInformationDialog(idDoc);

                var link = "../rest/FileService/GetFile/" + "90e79bf7-1c3e-467b-aaf2-9f8cdb376ce9" + "/" + idDoc;

                

                var file = document.createElement("a");

                file.href = link;

                file.download = nombreDoc;// + ".pdf";

                document.body.appendChild(file);

                file.click();

                document.body.removeChild(file);

            },

Hello, thank you for your answer!

 

I can't see where you pass the parameter to "downloadFile".

 

I don't need to know how to download a file. I want to know how to pass a parameter to a function when I click on a button.

Show all comments