Binding Data to Labels on a Page in Creatio

At times you might want to display read-only data on a page in Creatio. For example, you might want to display some calculation or data from some other object in a read-only label on the page. To do this, you’ll follow these steps:

  1. Add a text attribute on the page. This is what we’ll bind the label caption to
  2. Add the label to the diff
  3. Set the text attribute with the value we want to display in the label

In our scenario, we’ll keep things simple and just display a message about when an account was created on the account page. Our first step is to add a text attribute to the page. We’ll later bind our label’s caption to this attribute. The attribute will look like this:

attributes: {
	"CreatedOnMessage": {
		dataValueType: Terrasoft.DataValueType.TEXT,
		type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
		value: ""
	}
}

Next, we’ll add the label to the diff. The label will look like this:

{
	"operation": "insert",
	"name": "CreatedLabel",
	"values": {
		"itemType": Terrasoft.ViewItemType.LABEL,
		"layout": {
			"colSpan": 24,
			"rowSpan": 1,
			"column": 0,
			"row": 8,
			"layoutName": "ProfileContainer"
		},
		"caption": {
			"bindTo": "CreatedOnMessage"
		}
	},
	"parentName": "ProfileContainer",
	"propertyName": "items"
}

TIP: If you’re not sure how to add something into the diff and get it placed where you want it, drag some other unused field into the place you want (such as the CreatedOn). Then find it in the diff by doing a CTRL+F and searching for the property name (such as CreatedOn) to locate it. Then just modify it as needed and remove the “bindTo” part.

Notice, the caption is bound to our attribute we created above. Lastly, we’ll add some code to populate our attribute with a message, the message will then be displayed in the label. Our code will look like this:

methods: {
	onEntityInitialized: function() {
		this.callParent(arguments);
            
		var msg = "Created " + this.get("CreatedOn").toDateString() + 
			  " (" + Terrasoft.dateDiffDays(this.get("CreatedOn"), new Date()) + " days ago)";

		this.set("CreatedOnMessage", msg);
	}
}

With that code in place, our end result will look like the image below. I’ve also added some CSS to make this look more like some read-only text using a gray color, which is how most labels appear in Creatio.

Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Ryan Farley
Ryan Farleyhttps://customerfx.com/article/author/ryanfarley/
Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Building AI-Powered Workflows in Creatio Without Writing Code

See how Creatio can combine AI with no-code business processes to qualify, summarize, and route incoming leads while keeping your existing business rules and human oversight in place.

AI Readiness Checklist for CRM Teams: Is Your CRM System Ready for AI?

Before using AI in Creatio, make sure your CRM data, users, processes, and automation foundation are ready. Use this practical AI readiness checklist for CRM teams.

Build Your Creatio AI Skills with the 2026 AI Summer Program

Join Creatio’s free 2026 AI Summer Program to learn how to identify, build, deploy, and manage AI agents.

Creatio 10x Is Coming: Join the Webinar to Explore the Future of AI-Native CRM

Learn what's new in Creatio 10x and how AI-native CRM, agentic AI, and no-code automation are shaping the future of customer relationship management. Join the upcoming webinar and discover what's next.

Creatio Unlimited Pricing Explained: AI Packages, Costs, Pros & Cons

Learn what Creatio’s new Unlimited pricing model includes, what it doesn’t include, how AI Action packages work, and the pros and cons for businesses evaluating Creatio.

Related Articles

Building AI-Powered Workflows in Creatio Without Writing Code

See how Creatio can combine AI with no-code business processes to qualify, summarize, and route incoming leads while keeping your existing business rules and human oversight in place.

AI Readiness Checklist for CRM Teams: Is Your CRM System Ready for AI?

Before using AI in Creatio, make sure your CRM data, users, processes, and automation foundation are ready. Use this practical AI readiness checklist for CRM teams.

Build Your Creatio AI Skills with the 2026 AI Summer Program

Join Creatio’s free 2026 AI Summer Program to learn how to identify, build, deploy, and manage AI agents.

Creatio 10x Is Coming: Join the Webinar to Explore the Future of AI-Native CRM

Learn what's new in Creatio 10x and how AI-native CRM, agentic AI, and no-code automation are shaping the future of customer relationship management. Join the upcoming webinar and discover what's next.

Related Videos