Instead of usingthe FormatString widget as suggested by Lex, I would advise using the the 'native' Mendix Text widget (Common > Text). In the properties of this widget you can also configure attributes to be replace. This configuration can be found under General > Text.
This widget is available since Mendix 5.19.
To further add on the comment given by Lex. If your are going to display this calculated ProjectCode a lot. It would be smart to just store it in the database. It will be a performance improvement to not have to calculate the ProjectCode every time. You could consider using Event Handlers to automatically calculate and store the ProjectCode.
Trying to get a good visualization on what you want, but I think you are OK if you grab the FormatString widget in the Appstore. That will take attributes from the record selected in the Grid and allow you a formated display in the Dataview
Thank you for response. I'll try to be a bit clearer. I have two data attributes called ProjectID and ProjectAbbreviation. These two fields are stored separately in the DB as part of a single Entity. I want to combine these two fields and create a ProjectCode value (only in memory for display purposes. On the UI I have a master-detail view where there is a list of projects (master which is a data grid widget) and then the detail below (which is data view widget). When the user selects a project from the master data grid I want to "calculate" the ProjectCode value by concatenating the ProjectID and ProjectAbbreviation fields and then update a label (called lblProjectCode) with this value.
I had a look at the format string widget but looks like it only takes one attribute?
Correction: After I posted this response I played around with it and I did get it working using the format string widget. Thank you very much!