Hello team,

I have question that there are 2 tabs and inside it there is available 3 fields. For example, we have MainTab and AdditionalTab and inside MainTab there is firstname, lastname, middlename. Inside AdditionalTab there is Phonenumber, email, birthdate. I need to put validation to this fields separately. If I put validation to firstname and Phonenumber, these two shouldn't affect each other. when Firstname and Phonenumber is not filled in and try to save record, if I am on Maintab, system should return Firstname validation. at the same time, when I change tab to AdditionalTab, system should return Phonenumber validation. in this case how can I put validation based on tabs?

Below I'll share written code for validation.
 
define("UsrExample1Page", ["ConfigurationConstants"], function(ConfigurationConstants) {
    return {
        entitySchemaName: "UsrExample",
        attributes: {
         "CurrentActiveTab": {
               dataValueType: Terrasoft.DataValueType.TEXT,
               type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
               value: "" // Initial value, empty by default
           }
       },
        details: /**SCHEMA_DETAILS*/{
            "Files": {
                "schemaName": "FileDetailV2",
                "entitySchemaName": "UsrExampleFile",
                "filter": {
                    "masterColumn": "Id",
                    "detailColumn": "UsrExample"
                }
            }
        },
        methods: {
           onActiveTabChange: function(activeTab) {
               // Store the active tab identifier
               this.set("CurrentActiveTab", activeTab);
           },
 
           setValidationConfig: function() {
               this.callParent(arguments);
               this.addColumnValidator("UsrName", this.nameFieldsValidator);
               //this.addColumnValidator("UsrLastName", this.nameFieldsValidator);
               this.addColumnValidator("UsrPhoneNumber", this.phoneFieldsValidator);
           },
           nameFieldsValidator: function(value, column) {
               var invalidMessage = "";
               var firstName = this.get("UsrName");
               console.log("Name:", firstName);
               if (Ext.isEmpty(firstName)) {
                   invalidMessage = this.get("Resources.Strings.InvalidNameMessage");
                   // Switch to the tab containing the first name field
                   console.log("Switching to name tab:", invalidMessage);
                   this.set("CurrentActiveTab", "Tabbfc229c0TabLabel"); // Assuming "NameTab" is the tab identifier
               }
               return { invalidMessage: invalidMessage };
           },
           phoneFieldsValidator: function(value, column) {
             var invalidMessage = "";
             var phoneNumber = this.get("UsrPhoneNumber");
             console.log("Phone number:", phoneNumber);
             if (Ext.isEmpty(phoneNumber)) {
                 invalidMessage = this.get("Resources.Strings.InvalidPhoneNumberMessage");
                 console.log("Switching to phone tab:", invalidMessage);
                 this.set("CurrentActiveTab", "Tab68b5b8f6TabLabel"); // Ensure this is correct
             }
             return { invalidMessage: invalidMessage };
         }
       },
        dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
        diff: /**SCHEMA_DIFF*/[
           {
               "operation": "insert",
               "name": "Tabs",
               "values": {
                   "tabs": [
                       {
                           "name": "MainTab",
                           "caption": { "bindTo": "Resources.Strings.MainTabCaption" },
                           "items": [],
                           "change": { "bindTo": "onActiveTabChange" }
                       },
                       {
                           "name": "AdditionalTab",
                           "caption": { "bindTo": "Resources.Strings.AdditionalTabCation" },
                           "items": [],
                           "change": { "bindTo": "onActiveTabChange" }
                       }
                   ]
               }
           }
        ]/**SCHEMA_DIFF*/
    };
});
Like 0

Like

1 comments

Hello Abbos,

To do so, you can replace the OnSaved method, where you make a check:

1) needed tab is active 

2) validation successful

If both are true - call this.callParent(arguments). Else - add needed conditions.

onSaved: function() {
	var activeTab = this.get("ActiveTab");
	var isActiveTabTab2 = activeTab == "Name of the tab"; //result true\false
	var isFirstColumnValid = this.validateFirstColumn(); //result true\false
	if (isActiveTabTab2 && isFirstColumnValid) {
		this.callParent(arguments)
	} elese if () {
		...
	} else if () {
		...
	} else {
		...
	}
},
 
validateFirstColumn: function() {
	var colValue = this.get("ColumnCodeHere");
	return colValue == "Test value" || colValue = "1" //add conditions here
}

P.S. This method will not work with the required fields, since disabling the requirement is impossible.

Show all comments

This column in the form page works with a case. It has rules for changing statuses.

 

I want to block only it so that it cannot be edited in the detail list.

 

 

Can anyone help me?

Like 1

Like

1 comments

Hello!

 

By using basic functionality, you can only turn off all inline editing. In this case, you will not be able to edit all columns on the List page.

 

Show all comments

Hi colleagues,

 

Somebody know how can I made the default column "Name" of a detail (in Freedom) not clickable? 

 

Thanks in advance

 

Regards

Julio Falcón

Like 0

Like

2 comments
Best reply

I'm not aware of anything you can add in the column properties to make it not clickable, but it's possible that there's something available (hard to know and it's not mentioned in the List properties). 

Would it work to just expand the Lookup column to map the display value column directly to the list? Also, if you never want it a clickable link you can remove the default page for the object (if that is something that would work for your scenario - obviously won't work for OOTB entities)

I'm not aware of anything you can add in the column properties to make it not clickable, but it's possible that there's something available (hard to know and it's not mentioned in the List properties). 

Would it work to just expand the Lookup column to map the display value column directly to the list? Also, if you never want it a clickable link you can remove the default page for the object (if that is something that would work for your scenario - obviously won't work for OOTB entities)

Ryan Farley,

Thanks Ryan, I created another field and when create a new record using a process copy the Name column value to this column and in the detail show this another... is not the very best, but works :-)

 

Thanks

Julio

Show all comments

Hi

 

In Creatio 8.1.2 I think Creatio add a new user setting called: Number format.

 

All other user settings had a Default value to configure in System Settings, but I didn't found one to set a default value to this setting.

 

Is there one already or is it scheduled for a near future version?

 

 

Thanks in advance

 

best regards

Julio Falcón

Like 0

Like

3 comments

Hello,

It is now possible to change the number format for the user on the user profile page, since version 8.1.2. There are no settings to set default for all users format, as they can do it them self in their user profile settings.

Best regards,
Ivan

Ivan Savenko,

Please could you add this requirement to the to-do list?

 

All other user profile configurations have a system setting to define a default, why should this new one be different?

Hi any update on this feature , We really do not want to edit every account one by one to  get consistent number format

Show all comments

Thanks

 

 

Like 1

Like

5 comments

Ivan Savenko,

Dear Ivan,

 

I mean APP Icons, When I'm on App Hub and want to add a new app and assign it an icon, I can just access predefined icons. 

 

I need to know, if like in CLassic UI, I can upload my own.

Thanks

Ivan Savenko,

Dear Iva, Hello Colleagues, some idea how to do what I'm asking? is it possible?

Julio.Falcon_Nodos,

I believe you can add the image bytes into the SysModule record, however, I don't know of any easy way to do this without creating something to load the bytes into the table. The no code tools only allow for selecting from the list of choices.

Ryan

Ryan Farley,

Thanks Ryan,

 

In Classic UI this were a daily task (In Section Wizard), I expect in some near future it could be available on App Wizard also to Freedom APPS

 

Regards,

Julio

Show all comments

Hi,

 

Does anyone know what table they are in, I need to reset them once a year.

 

We, when a record is generated with Autonumber, we add to the Autonumber field, the year. So we need each year to have a new numbering, starting with 1.

 

Thanks in advance

 

Julio Falcón

Like 2

Like

10 comments

Hi Julio

The AutoNumber value is stored in a Sequence in the database (Postgres Sequence for cloud instances).
For example, you can get the last value of a sequence using this query:
SELECT last_value FROM "Contact_RId_seq".

To reset a sequence, you can use the following query:
ALTER SEQUENCE "seq_name"
RESTART WITH 0;

Hope this helps!

Mohamed Ouederni,

Thanks,

 

1.- But, can I access this data from a process? 

2.- Have access to this object from a process, 

3.- How to determine which sequence correspond with a specific section?

I have not visible this table from a Creatio Cloud instance, I've enabled an autonumber field in contacts, for example, and not available the table mentioned by @Mohamed, see it

 

Hi Julio

 

1- You can run a custom SQL query from a Task Script.
2- No, you don't have access to the sequences.
3- The sequence name is identical to the column UId. You find it in the source code tab of the Object in Advanced settings.

 

Thanks!

Hello Julio,

Once you add the autonumber column, you'll need to get the UId for the column. You can open the object then select "Open metadata" under the Actions menu, the find the column and get the Guid for the UId. 

That is the name of the sequence in the database. If needed, you can use that to get the next sequence value using this where the guid is the UId for the column (for Postgresql):

SELECT nextval('ed398640-de69-842b-c50c-6c673da5aa98')

Then to reset it to 1 again you can use this (if needed, replace the 1 with whatever number you want the sequence to start at): 

SELECT setval('ed398640-de69-842b-c50c-6c673da5aa98', 1, false);

To do this via a process, you'll need to do a direct database connection and you'll use a script task, see https://customerfx.com/article/executing-direct-sql-statements-in-a-process-or-configuration-web-service-in-creatio-formerly-bpmonline/

Lastly, if you want to get what the last value/number used from the sequence was, you can use:

SELECT last_value FROM "ed398640-de69-842b-c50c-6c673da5aa98"

Ryan

This is No Code ? In Classic UI was sImple, why in Freedom I need NASA certification to do this?

Julio.Falcon_Nodos,

Yes, for now to reset the value it requires the database update (either by Clio, SQL Executor, or asking support to update the value). I do hope we'll get a UI to manage that at some point. The prefix is also set at the object level now, instead of a system setting - so that now requires an object publish to change rather than updating a setting.

Ryan

Ryan Farley,

Thanks for your support Ryan

Julio.Falcon_Nodos,

Hello,

Yes, unfortunately at this moment there is no possibility to reset sequence using No Code. But you can always contact support, and we will be happy to do it for you. We have created a request to the responsible development team to add this functionality in future releases.  

Antonii Viazovskyi,

Thanks Antonii

Show all comments

Hi, mentors, 

 

      I'd like to have the function to auto save for specific field when lookup change,  instead of clicking the Save button. 

I think it might need the handler function is js, if existed, please kindly share. 

 

Jeffrey. 

 

Like 0

Like

3 comments
Best reply

You'll need to add a change request handler to know when the lookup value has changed. See https://customerfx.com/article/responding-to-an-event-when-a-field-is-changed-on-a-creatio-freedom-ui-page/

Then you'll execute a crt.SaveRecordRequest to save the record. See https://customerfx.com/article/saving-a-page-before-some-action-on-a-creatio-freedom-ui-page/

Ryan

You'll need to add a change request handler to know when the lookup value has changed. See https://customerfx.com/article/responding-to-an-event-when-a-field-is-changed-on-a-creatio-freedom-ui-page/

Then you'll execute a crt.SaveRecordRequest to save the record. See https://customerfx.com/article/saving-a-page-before-some-action-on-a-creatio-freedom-ui-page/

Ryan

Ryan Farley,

I've implemented it, and it works. thanks. 

Ryan Farley,

 

if we use input number field instead of lookup to do auto save, would you recommend any reference that might help. Becaue of the  Lookup value for quantity is not quite appropriate, we decide to use input number field for quantity information. We hope when user input the quantity, after losing focus to the number field, it can do the auto save. 

Thanks for your help in advance. 

Show all comments

Dears

 

Again in Creatio 8.1.4 we found not available the selection of a contact to create a new Creatio User.

 

To enable this you need to enable the SysAdminUnitFeatures.ShowContactInAdminUnit Feature.

 

But when did it, and try to save get an error "Name field must be filled in".

 

Had somebody try this?, is some workorund? or another way to enable select a contact to cerate a New User in STUDIO Creatio instance (JUST Studio)

 

Thanks

 

Julio Falcón

 

 

Like 2

Like

2 comments

Hello,

1) When adding this feature, you should specify "For all employees".
2) Save for current user. 
3) Enable the feature in general.
 
Then the error shouldn't occur.

 

Ivan Savenko,

Thanks Ivan

 

I saw I need to 

1.- Open the Feature page, 

2.- Add the All Employees group, 

3.- Check enable the feature to all Employees,

4.- Click on Status to Enable

5.- Save (Still getting the error, but saves)

6.- Logout & Login and voila, the contact search in System Users is available.

 

Show all comments

Dears

 

Somebody knows how to enable use Ststic Filders in Freedopm UI Sections to new sections?

 

I have enabled the IsAllowUseStaticFolders Feature, also added my object to "Schemas for enable static folder in folder tree"  lookup and still have not enabled in my section to add static folders. What's wrong/missing?

 

Thanks in advance,

 

Best regards

Julio Falcón

Like 2

Like

4 comments

Hello,

 

Here are a few things that might be missing:

 

  • - Don’t forget to add mass actions (“Add records to static folder”/”Remove records from static folder”) to the required grid;
  • - Switch the "Folder storage location" in the designer to FolderTree:
  • folder tree

 

Hanna Skalko,

Thanks Hanna, but in my instance the "Folder Storage Location" is read only, so I can't change it.

 

SO I cannot also add mass action to add/remove from the static Folder

 

Also in the Section the "Add static folder" is not enabled

 

 

 

Hello, some news regarding this?

Hello, somebody there can help with this question?

Show all comments

Hello,

 

For limited internal licenses, the user is only supposed to have access to one section.  How do you set this access up?  

Like 1

Like

4 comments
Best reply

Hello,

You need to create a new user workplace with the type "Limited internal."  

Then, add the desired section to this workplace. 

After that, create a specific role where you will add users with this type of license.

Finally, add this role to the "User groups" detail.


You can get more information by watching this part of the instruction video.

 

Hi,

 

1. Define a new functional role.
  
2. Assign specific users to the functional role (Users tab).
  
3. Users can be assigned to the functional role, replacing existing administrator and employee roles.
  
4. Create one new workplace setup and add the section and user groups  

Hello,

You need to create a new user workplace with the type "Limited internal."  

Then, add the desired section to this workplace. 

After that, create a specific role where you will add users with this type of license.

Finally, add this role to the "User groups" detail.


You can get more information by watching this part of the instruction video.

 

Bala Koteswarareddy,

Thank you!  This worked perfectly.  I made a new Limited Internal workplace and gave access to a new functional role which I'm assigning the Limited internal users to.

Antonii Viazovskyi, Thank you!  This worked perfectly.  I made a new Limited Internal workplace and gave access to a new functional role which I'm assigning the Limited internal users to.

 

Show all comments