How to trigger event in string text field.

 

Example: I want to open document lookup when there is changes in the value of text field 

Like 0

Like

1 comments

Dear Fulgen,

See this example to find out how to create a method that watch for changes in some fields. In simple words, you will need creating an attribute, that will have dependencies on needed columns and fires a method. You can see many examples in the configuration like this one:

attributes: {

                    "Status": {

                        "lookupListConfig": {

                            "orders": [{columnPath: "Position"}]

                        },

                        "dependencies": [

                            {

                                "columns": ["Status"],

                                "methodName": "onOrderStatusChanged"

                            }

                        ]

                    },

...

where:

"columns": ["Status"] - list of columns where you watch for changes

"methodName": "onOrderStatusChanged" - method that fires when "Status" column is changed

Show all comments

I have a string text field which I want to do is open a document lookup whenever I hit [Enter] on it.

Like 0

Like

1 comments

Dear Fulgen,

I have answered here how to watch for changes in a field. Pressing Enter fires the changing event. If you need more complex logic, you may need to create your own controls. Follow this link to see how.

Show all comments

Hello,

Im trying to lock an attachment from being downloaded from the knowledge center. Is this possible in some way? I would need a full lock, nobody except Supervisors could download them

Thank you for your time

Like 0

Like

1 comments

Dear Pablo,

Such task can only be achieved by the means of development in the system.

In the Configuration add a replacing schema of FileDetailV2.

In the schema, you need to:

1. Initialize check of the current user, whether he has system administrator role. This is an ESQ method called in init function.

2. Set the result of ESQ to an attribute, so to use it later in the method check.

3. Override basic addColumnLink method and add two checks: section check and system administrator check.

The example of replacing FileDetailV2 schema is displayed below:

define("FileDetailV2", ["ConfigurationConstants"], function(ConfigurationConstants) {
	return {
 
		attributes: {
			"isSysAdmin": {
				"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
				"dataValueType": Terrasoft.DataValueType.BOOLEAN,
				"value": false
			}
		},
 
		methods: {
			init: function() {
				this.getUserRights();
				this.callParent(arguments);
			},
			addColumnLink: function(item, column) {
				if (this.parentEntity.EntityName === "KnowledgeBase") {
					if (this.get("isSysAdmin")) {
						this.callParent(arguments);
					}
				} else {
					this.callParent(arguments);
				}
			},
			getUserRights: function() {
				var scope = this;
 
				var currentUser = Terrasoft.SysValue.CURRENT_USER.value;
				var sysAdmins = ConfigurationConstants.SysAdminUnit.Id.SysAdministrators;
				var esq = Ext.create("Terrasoft.EntitySchemaQuery", { rootSchemaName: "SysUserInRole" });
				esq.addColumn("SysRole");
				esq.addColumn("SysUser");
				esq.filters.add("SysUser", Terrasoft.createColumnFilterWithParameter(
					Terrasoft.ComparisonType.EQUAL, "SysUser", currentUser));
				esq.filters.add("SysRole", Terrasoft.createColumnFilterWithParameter(
					Terrasoft.ComparisonType.EQUAL, "SysRole", sysAdmins));
				esq.getEntityCollection(function(response) {
					if (response && response.success) {
						var result = response.collection;
						var isSysAdmin = (result.collection.length !== 0);
						scope.set("isSysAdmin", isSysAdmin);
					}
				}, this);
			}
		}
	};
});

Regards,

Anastasia

Show all comments

Hi,

I create exclusive gateway (OR) in my process. I am trying to simulate that the parameter sent from the date is empty. I want to check in the gate if the date: it is empty if it wants to fulfill some condition. How to do it?

Like 0

Like

2 comments

Hello,

You need to add a date/time parameter to business process and live it empty. Then compare your column to this empty parameter in conditional flow to check whether the date was specific or not.

P.S.: date without value is basically "1/1/0001 12:00:00 AM".

Regards,

Oleh

Hello, 

i was create scipt to check what have inside empty DateTime and then i was change my or gateway. [#ExampleDate#]== DateTime.MinValue . "1/1/0001 12:00:00 AM"  is inside MinValue before i was think empty DateTime is DateTime? and is null.

Regards,

Przemek

Show all comments

Hi,

 

Do you have any working example how to consume Azure Machine Learning web service on BPMOnline BusinessProcess and Web Service function ?

 

thanks

Antonius 

Like 0

Like

6 comments

Hello,

First, you need to set up an integration with  Azure Machine Learning web service in the bpmonline. Please, see the documentation - https://academy.bpmonline.com/documents/administration/7-12/integration…

Then you can call the web service via [Call Web Service] process element in your business process - https://academy.bpmonline.com/documents/technic-bpms/7-12/call-web-serv…

 

Tetiana Markova,

 

thanks for your reply.

I tried to consume it using as per documentation but have no luck so far.

(1) tried the webservice using Postmand (works)

 

 

 

 

 

 

 

 

(2) try using BMOnline with same parameters

2 headers parameters

Key : Authorization

Authorization : Content-Type

 

1 body parameters

 Json path : $

Data Type : text

is Array : No

Value : <copy from Postman raw body>

 

 

 

but it keep replying response 400

{"error":{"code":"BadArgument","message":"Invalid argument provided.","details":[{"code":"InputMismatchError","target":"input1","message":"Input data does not match input port schema."}]}}

 

how to fixed this ? am I missing something ?

 

thanks

 

 

Dear Antonius,

I don't see where you call the webservice. Perhaps, you didn't set a value to input1 parameter

Peter Vdovukhin,

Hi Peter,

thank you for your comments.

 

I called the web service in Business Process 

I'm not sure whether I set the input parameter correctly. the value and format is exactly same from what I used  Postman.

thanks

 

Hi Antonius,

You should deploy an application on-site, create a web service call and test network via fiddler to see what request is sent to web service. The message you've got means that bpm'online sends a request in a format that differs from that you are expecting. Then you can set up parameters in a such way that will fit to Azure learning standard.

The other option will be creating a script task with calling that webservice from c# code. If you are a developer this is the best way because allows you to do more than built-in web service call.

Peter Vdovukhin,

Hi Peter,

thank you for your comment.

I follow your suggestion by creating a script task.

(1) [in process methods setting menu] add RestSharp name space 

(2) [in script task] construct Json to be put in body parameter:

string json = JsonConvert.SerializeObject(data);

 

(3) [in script task] use RestClient to call web service and adding the necessary parameters    

var client = new RestClient("https://xxxxx.xx.azureml.net/workspaces/xxxx/services/xxx/execute?api-version=2.0&amp;format=swagger");
	var request = new RestRequest(Method.POST);
	request.AddHeader("Cache-Control", "no-cache");
	request.AddHeader("Content-Type", "application/json");
	request.AddHeader("Authorization", "Bearer FpIlxxxxxxxxxxxx");
	request.AddParameter("undefined",  json , ParameterType.RequestBody);
	IRestResponse response = client.Execute(request);

it works for me.

thanks !

 

Show all comments

Hi community!

Is there any way to hide a section in the search of the command line ?. For example, the contacts

King Regards,

Ezequiel

Like 0

Like

1 comments

Hello,

As for now there is no possibility to turn off the indexation for the section in the application, but we have a correspondent problem registered in our system and the functionality will be added in 7.12.4 or 7.13.0 version of the application. In one of these versions there will be the possibility to turn the indexation off for the specific section (turn the global search off for the section). We've also informed our R&D team about this request, so to inform them how important this functionality is.

Best regards,

Oscar

Show all comments

Hi does anyone know if BPMOnline can work wit Azure SQL Single Database ?

Like 0

Like

1 comments

Hello!



Technically, this can be implemented because Azure SQL Single Database has the functionality of the MS SQL Server, which is necessary for bpm’online setup

However, this deployment was not tested by any developer or client, thus no one can predict how exactly the system will perform: some functionality might not be working correctly. We suggest to choose cloud deployment instead not to spend any resources for database deployment and maintenance.

Show all comments

Hi Sir/Madam,

Based on System users created from System designer, Please tell me how do we create different dashboards for different system users.

Regards

Raghu Ram

Like 0

Like

1 comments

Dear Raghu Ram,

There is an option to set up access rights for every dashboard:

You can simply set it up according to the users roles, or each user individually. More details can be found here.

Oleh

Show all comments

Hi community!

I add a button section but i want it don't show when I open edit page. In this case, i add a section button on Contact Section. I show images below

Regards,

Thanks you!

Like 0

Like

4 comments

Hello Ezequiel,



You need to define an attribute that will determine the visibility of your button. By default, it will be true. Then you need to override onCardRendered method in your replacing schema for Contact Section and set the attribute as false.

Please, see my example:

 

define("ContactSectionV2", [],

    function() {

    return {

        entitySchemaName: "Contact",

        attributes: {

            "ButtonVisible": {

                "dataValueType": Terrasoft.DataValueType.BOOLEAN,

                "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                "value": true

            }

        },

        messages: {},

        methods: {

             onCardRendered: function() {

                 this.callParent();

                 this.set("ButtonVisible", false);

             }

        },

        diff: /**SCHEMA_DIFF*/[

            {

                "operation": "insert",

                "parentName": "ActionButtonsContainer",

                "propertyName": "items",

                "name": "MainContactSectionButton",

                "values": {

                    itemType: Terrasoft.ViewItemType.BUTTON,

                    caption: { bindTo: "Resources.Strings.TestButton" },

                    "visible": {bindTo: "ButtonVisible"},

                    "layout": {

                        "column": 1,

                        "row": 6,

                        "colSpan": 1

                    }

                }

            }

        ]/**SCHEMA_DIFF*/

    };

});

 

Tetiana Markova,

Hi! I wanted to use this code also, but i have a question. Where do I insert the name of my button? 

Tetiana Markova,

 

I don't know if you are still following this thread, but the problem with this method is that when the user closes the edit page the button is not restored to the section list page.  Any solution?

 

Thanks,

The way I got round the above was to include the following method:

			showSection: function() {
				this.callParent();
				this.set("ButtonVisible", true);
			},

This reshows the buttons.  This is purely a hack and unofficial, caveat emptor.

Show all comments

Hi community!

How are you?

How could I add a button on row section?

Thanks you!

Regards,

Ezequiel!

Like 0

Like

2 comments

Please investigate the code in the basesectionv2 module. Please use google chrome dev tools for the investigation.

You can create a replacing client module for the section and add the button in the same way as other buttons were added. 

http://prntscr.com/kqgyym

Additionally, you'll need to override the "onActiveRowAction" method and add a handler for the button. 

http://prntscr.com/kqgzs4

 

Miroslav Kytka,

define("AccountSectionV2", ["AccountSectionV2Resources"], function(resources) {
	return {
		entitySchemaName: "Account",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "MyCustomLockAction",
				"parentName": "DataGrid",
				"propertyName": "activeRowActions",
				"values": {
					"className": "Terrasoft.Button",
					"style": Terrasoft.controls.ButtonEnums.style.BLUE,
					"caption": resources.localizableStrings.UsrLockCaption, 
					"tag": "lock",
					"enabled": true,
					"visible": true
				}
			}
		]/**SCHEMA_DIFF*/,
		methods: {}
	};
});

 

Show all comments