I need to reset a page field to the state "not filled in", based on the value of some other fields values, in order to force the user to re-enter it.

Is it possible ?

Like 0

Like

3 comments
Best reply

Norton Lingard,

I have just written an tested the solution..

thanks for your attention.

...

attributes: {  

                 "NullLookup": {

                        "dataValueType": this.Terrasoft.DataValueType.LOOKUP,

                        "type": this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                    "value": null

                    }

                    "FinMainCategory": {

                        dataValueType: Terrasoft.DataValueType.LOOKUP,

                        dependencies: [

                            {

                                columns: ["FinEntryType"],

                                methodName: "setMainCategoryToNull"

                            }

                        ]

                    },

...

methods: {

...

            // Handler method that sets Main Category to null

            setMainCategoryToNull: function() {

                var nullLookup = this.get("NullLookup");

                this.set("FinMainCategory", nullLookup);

            },

...

Dear Ricardo,

 

In order to implement the required functionality please use the “dependencies” property of an attribute and in a method-handler set the value of the field to the “not filled in” value. Please see the example of the code below (UsrTest, Dear and Phone are the attributes of a particular object):

 

attributes: {

       "UsrTest": {

            "dependencies": [

              {

                "columns": ["Dear", "Phone"],

                "methodName": "setUsrTest"

               }

            ]

          }

      }

 

setUsrTest: function(){

                if (this.get("Phone") === "111" && this.get("Dear") === "test"){

                    this.set("UsrTest", "not filled in"); 

                }

            }

 

 

Please find additional information in the article by the link below:

 

https://academy.creatio.com/documents/technic-sdk/7-16/attributes-attributes-property

 

Best regards,

Norton

Norton Lingard,

It is a lookup field. 

The goal is to force the user to clear the field value, in order to force the user to enter a new value, just like a field that has nor been filled in yet.

 

Norton Lingard,

I have just written an tested the solution..

thanks for your attention.

...

attributes: {  

                 "NullLookup": {

                        "dataValueType": this.Terrasoft.DataValueType.LOOKUP,

                        "type": this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                    "value": null

                    }

                    "FinMainCategory": {

                        dataValueType: Terrasoft.DataValueType.LOOKUP,

                        dependencies: [

                            {

                                columns: ["FinEntryType"],

                                methodName: "setMainCategoryToNull"

                            }

                        ]

                    },

...

methods: {

...

            // Handler method that sets Main Category to null

            setMainCategoryToNull: function() {

                var nullLookup = this.get("NullLookup");

                this.set("FinMainCategory", nullLookup);

            },

...

Show all comments

I need to adjust a just-entered field on the edit page, like the example below

 

               var comp = .... ;

                var amount = this.get("FinAmount");

                if (!amount) {

                    amount = 0;

                }

                if (comp === "x") {

                    this.set("FinAmount", -amount);

                }

FinAmount is a page editable field. The new value is shown on the page, but it is not saved when the save button is pressed.

The code works fine with read-only fields.

 

Please help 

Like 0

Like

9 comments

Dear Ricardo, 

 

Here is the working example of the code that changes the value of the column UsrTest to the -value when the column value is changed (works for non read-only fields as well). Please debug your code if the same code works differently for you: 

		attributes: {
			"UsrTest": {
				"dependencies": [
				  {
					"columns": [ "UsrTest" ],
					"methodName": "setUsrTest"
				  }
				]
			}, 
			"UsrTestChanged": {
					"dataValueType": this.Terrasoft.DataValueType.BOOL,
					"type": this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
				"value": 0
		}
}

 

			setUsrTest: function(){
				if (this.get("UsrTestChanged") === 0){
					this.set("UsrTestChanged", 1); 
					var amount = this.get("UsrTest");
					this.set("UsrTest", -amount);
					//this.save(); 
				}
				else {
					this.set("UsrTestChanged", 0); 
				}
			},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "INTEGERa10da2ec-524f-4a7d-9219-7bb6acbefd2c",
				"values": {
					"layout": {
						"colSpan": 24,
						"rowSpan": 1,
						"column": 0,
						"row": 8,
						"layoutName": "ProfileContainer"
					},
					"bindTo": "UsrTest",
					"enabled": true
				},
				"parentName": "ProfileContainer",
				"propertyName": "items",
				"index": 8
			},

 

Best regards, 

Dennis 

Dennis Hudson,

Thanks for your reply.

I have tried your code, but got the same results.

The sign of the field is changed on the screen, but it is not saved...

 

My code:

                    "FinAmount": {

                        dataValueType: Terrasoft.DataValueType.FLOAT,

                        dependencies: [

                            {

                                columns: ["FinAmount"],

                                methodName: "adjustAmount"

                            }

                        ]

                    },

                    "FinAmountChanged": {

                        "dataValueType": this.Terrasoft.DataValueType.BOOL,

                        "type": this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,

                    "value": 0

                    },

 

...

 

            // Handler method that calculates the sign of the [FinAmount] column.

            adjustAmount: function() {

                    var crDb = this.get("FinCrDb");

                    if (crDb === "Db") {

                        this.set("FinAmountChanged", 1);

                        var amount = this.get("FinAmount");

                        this.set("FinAmount", -Math.abs(amount));

                        this.set("FinAmountChanged", 0); 

                    } 

            }

...

 

            {

                "operation": "insert",

                "name": "FLOATe30ea95d-a165-4b34-ac4b-7e9c33102483",

                "values": {

                    "layout": {

                        "colSpan": 8,

                        "rowSpan": 1,

                        "column": 0,

                        "row": 0,

                        "layoutName": "Header"

                    },

                    "bindTo": "FinAmount",

                    "labelConfig": {

                        "caption": {

                            "bindTo": "Resources.Strings.FLOATe30ea95da1654b34ac4b7e9c33102483LabelCaption"

                        }

                    },

                    "enabled": true

                },

                "parentName": "Header",

                "propertyName": "items",

                "index": 3

            },

 

Dear Ricardo Bigio,

 

You can save the page with the method this.save()

 

Best regards, 

Dennis 

Dennis Hudson,

I have tried this.save() too (although it is nor appropriate for us , as the page is saved regardless of the user has decided to save). But the result is  the same. The page is saved without the change in the field.

Ricardo Bigio,

 

You can set the value of the field directly in db using UpdateQuery. Please see the example in the article below: 

https://academy.creatio.com/documents/technic-sdk/7-16/handling-selection-several-records-examples

 

Best regards, 

Dennis 

Dennis Hudson,

Thanks again.

I need a solution to be done in the edit page, automatically, as the user enters the field values, according to the dependencies among them.

UpdateQuery will not be suitable in this case.

Any other suggestion ?

Ricardo Bigio,

 

UpdateQuery can be done on the edit page as well and will automatically update the value of the column in db (please see example in the academy page I've sent earlier). Could you please specify why it wouldn't work in your case? 

 

Best regards, 

Dennis 

Dennis Hudson,

Is there a solution in which the value is saved ONLY in the page (not in db) ? Of course it will be saved in the db if the user hits "SAVE" afterwards).

Ricardo Bigio,

 

In case you use a method such as:

 

onEntityInitialized: function(){
				this.callParent(arguments);
				this.set("UsrInteger2",2);
			}

the value of 2 won't be saved for UsrInteger2 column in the database (until the "Save" button is not clicked and the database value is ignored in the UI). Each time the "Save" button is clicked an UPDATE query is executed and there is no way to override the "Save" button functionality.

 

Best regards,

Oscar

Show all comments

Hello all,

 

I am configuring an Agent Desktop that allows me to process emails and sort them into different queues based on what the email is in regards to. 

The process that runs for the queue opens an edit page and allows the user to view the email. I have added a business process to the page that users can launch to open another edit page but when I activate it, the page doesn't open. I can only see the process start in the business process tasks panel in the communications panel on the right side of the screen.

Is there a way I could start a business from the queue page and have the open edit page replace the email screen?

 

Thanks.

Like 0

Like

2 comments

Dear Kevin,

 

Processes can start in the background and if they are they could behave like this. Please check that "Run following elements in the background" checkbox is unchecked for start element and the element that should open the page. You can read more about this checkbox here: https://academy.creatio.com/documents/technic-bpms/7-15/simple-start-event

 

Best regards,

Angela

Angela Reyes,

Thanks! that did the trick.

Show all comments

Hi;

I create the edit page which contain editable detail on it

When i run this page from section or from process i can edit this detail

when i run it from another edit page by the link in noneditable detail i cant edit it there is no add button and when i enter the detail the data disapear.

 

Regards

Tomek

Like 0

Like

1 comments

Usually, when the data is disappearing, I have had the wrong columns set in the Detail setup in the Page Wizard. If the detail is looking for the wrong columns in the two sections, the link between them is broken. and it will create the records but not show them. It is hard to know without more information. 

Show all comments

Hello all,

I am working on configuring the duplicate records found page. Is there a way to be able to click on the duplicate record and be taken to the duplicate's record page?

Like if I am adding a record for Kevin Brady, and then this page appears. Can I click on one of these records to say that the found duplicate is actually the record I'm looking for? It seems limiting that my only options are to either back up or to just continue and save the duplicate.

Like 0

Like

1 comments

Hello Kevin,

Unfortunately there is no way to setup system in the way so if you click on duplicates on save list record you are redirected to this record. It was always like that and I've already created a problem to our R&D team so they could add this possibility in an OOB version of the application. Currently you need to return to section list after saving the record and create filter that returns all duplicates records and merge them in section.

Thank you for the idea of Creatio application logic improvement!

Best regards,

Oscar

Show all comments

Hi Community, 

I'm working on a project for a client and wondering if it is possible to add another Tab bar within a tab on the section edit page. 

We have a Tab which contains several detail lists and if possible would like to add a tab bar partway down the page between two details so we can view other objects relating to the detail above it.

Is it possible to add multiple tab groups on the section edit page?

Thanks

Like 0

Like

1 comments

Unfortunately, there is no tools in out-of-the box system for adding multiple tab groups on the edit page.

Show all comments

Hi,

i would like to know how can i access the array of items inside this ProcessRun Button:

I've tried to use "EditPages" and "diff" from the page, but it didn't work.

Best Regards.

Thanks in advance.

 

 

Like 0

Like

1 comments

Dear Pedro, 

You can access the content of the list by getting the value of an attribute RunProcessButtonMenuItems:

 var processButtonMenuItems = this.get("RunProcessButtonMenuItems");

 

Show all comments

I am trying to have two edit pages reference the same schema. The two pages depicted below reference two different schemas called Case1Page and Case2Page. However, I would like them to both reference Case1Page so that I don't have to individually modify each page. How would I go about setting this up? I know it's possible because the Activity Section does it for the two Activity edit pages but I have not been able to figure out how to do it myself.

Like 0

Like

1 comments

Dear Kevin,

It used to possible to achieve this task by setting the parent CasePageV2 schema as the parent schema for Case1Page in older versions on the applications. It would replace the original Case1Page schema with the desired one, however due to multiple problems during the versions upgrade it is no longer possible to replace the modules. Therefore, you would need to develop separate schema with the required page layout which will not be actually in use but you would connect all Case1Page, Case2Page etc schemas to it. Thus the layout would be the same for all other pages.

Dean 

Show all comments

When I open my page on a large screen the simple info button / user hint appears as desired/correctly:

However, when I minimize the screen or view my page on a smaller screen, the simple info buttons / user hints appear over the top of the boolean field, where as the text field info button remains the same?

How am I able to wrap the info button to the boolean fields?

Like 0

Like

1 comments

Please feel free to modify CSS according to your needs. The article by the link below explains how to add a new CSS class. If you add it to the BootstrapModulesV2 module then it will be loaded after loading the application. 

https://community.bpmonline.com/questions/how-add-custom-style-control-…

Show all comments

I have created a custom [Connected entity profile] on the accounts section that is a duplicate of the primary contact connected entity, except the text displays: Billing Contact:

 

I have followed the following academy article to do so: https://academy.bpmonline.com/documents/technic-sdk/7-13/connected-entity-profile-control

 

But am unable to set the default image ?? (I.e. I want the billing contact to have the same icon as the primary contact when an entity is not yet selected for the field ...):

 

 

Like 0

Like

1 comments

Please feel free to set any default image in the configuration section. In order to do it open the billing profile schema and upload the needed image in the BlankSlateIcon property. Save the schema and clean the cashe.

Show all comments