This topic is being maintained as a quick reference guide for BFormat in Tridium Niagara.
I also encourage you to watch this useful video from Broudy Precision.
BFormat Expression
Description
%.%
Value + Status of the Out slot
%out.value%
Value of the Out slot
%out.status%
Status of the Out slot
%Hours%
Get the total elapsed time in hours
%Minutes%
Get the total elapsed time in minutes
%displayName%
Display Name of the component
%displayName.substring(0,3)%
Display Name of the component showing only the part from the first to the third character
%displayName.substring(-2)%
Display Name of the component showing only the end part from the second-last character
%name%
Name of the component
%parent.displayName%
Display Name of the parent component (1 level up)
%parent.name%
Name of the parent component (1 level up)
%parent.parent.name%
Name of the parent of the parent component (2 levels up)
%parent.proxyExt.device.name%
Name of the device in which a proxy point resides (no matter how many levels above the point)
%parent.proxyExt.network.name%
Name of the network in which a proxy point resides (no matter how many levels above the point)
%proxyExt.topic%
On an MQTT point, returns the “topic” text
%user()%
Returns the username of the user logged in (use “ord” “station: slot:/”)
%time()%
Returns the current time (use “ord” “station: slot:/”)
%alarmData.sourceName%
(to use on Alarm Extension Text) Returns the “Source Name” within the Fault, Offnormal or Normal text of an alarm
%alarmData.highLimit%
(to use on Alarm Extension Text) Returns the “High Limit” within the Fault, Offnormal or Normal text of an alarm
%alarmData.lowLimit%
(to use on Alarm Extension Text) Returns the “Low Limit” within the Fault, Offnormal or Normal text of an alarm
%out.prevDay%
Using the “CurrentTime” block available from the kitControl palette, these bFormat examples will take the full date and time of the previous day, month or year according to the current time
This was really helpful. I finally feel I know what these commands are doing (a bit) instead of just me writing what other people tell me (ie. basically hieroglyphics to me). Thank you!
This is more help, thank you. I’m still trying to understand these better on the fly (with this and other help, with time, I can figure out what they do). I need more practice so that I can write them correctly, with all the %parent.parent.parent…% with fiixed text and including these values that are pulled in. It’s vey powerful, I just need to practice more!!! I love the ability to use these in graphics! Thank you again.
So if you were to take the name of the History Extension itself, it would be %name%
If you wanted to add the point name where the history extension is located, well the point is the parent, therefore you will just add “parent.” to name giving you %parent.name%. After that, each additional level up is a parent itself.
With your help, I’m getting the structure. My mind has some problems integrating it as a whole, picturing exactly what the whole is. I’m starting to understand the parts. Thank you again for all your answers and help!
Lets look at a RoomTemp(NumericWritable) block. It has different slots, Although not shown in the hierarchy, they can also be navigated to.
RoomTemp(NumericWritable)
└──out
└──value
└──status
└──In1
└──value
└──status
and so on...
So, if you assign a px view to vav-105, and need to fetch room temp, your BFormat will be %points.RoomTemp.out.value%
if you have history extension under room temp that needs a name, it would be something like %parent.parent.parent.name% for VAV-105 and %parent.name% for RoomTemp.
Keep in mind that everything in niagara has a name and a displayName slot.
For BFormats like %out.prevMonth% or %out.Day%, its still the same thing. In this case, instead of status or value slots, out has prevMonth and day slots.
Alarm data took me a while to understand but again, its the same thing. %alarmData% refers to alarm extension you’re using the BFormat in and sourceName, highLimit, lowLimit, etc are just slots within the extensions.
I’m trying to understand %alarmData% better. I want to reference the station name and ip address of my alarm in the alarm text, but it seems like you can only reference slots within the extension using %alarmData%. From what I understand, you can’t use any other BFormats in alarm texts other than %alarmData%, which makes this even more challenging.
I’ve thought of adding a slot to the alarm extension which can reference what I want and use that, but what I’ve tried so far hasn’t worked. Any tips?
So, I figured out a work around for anyone who might come across this in the future wanting to make dynamic text in their alarms. I created a new slot in the Config of my JACE with the station name and IP address (you could create a string writable somewhere in the JACE as well), and linked that to a program block (from the program palette) which can use the text from the slot. You can then concatenate messages with all the information you need for the alarm texts and set those to output slots on the program. Then you link those output slots to the slots on the alarm for toOffnoram, toNormal, High Limit, and Low Limit texts, where it will populate those text boxes. The code for the program block is below. It doesn’t need any imported libraries other than the default ones. In theory, with this method you could add anything to your alarm text.
Here’s an image of the program block and how it links: