🧩 Macros — propform & onOffice

Macros are placeholders that are replaced with actual values at runtime — e.g. the first name of a loaded address, the UUID of a property, or the current date.

Contents


Where can macros be used?

| Location | Macros active? | |--------|---------------| | Form heading / subheading | ✅ | | Field label, hint, placeholder, tooltip | ✅ | | Default value, required value | ✅ | | Description fields (special type) | ✅ — incl. propform macros such as _pfButton, _pfLink | | Activity note | ✅ | | Task subject & description | ✅ | | Email recipient, CC, BCC | ✅ | | Email subject & body | ✅ | | Thank you page URL | ✅ | | “Write values” target values | ✅ | | File upload field name | ✅ | | Link button URL | ✅ | | File download custom name | ✅ |


## Standard onOffice macros

You can find the complete official list of macros in the onOffice Help.

> ⚠️ Note on naming conventions: onOffice is inconsistent regarding upper and lower case. Address macros are usually in CamelCase (first letter capitalised), whilst property macros are lower case. Stick strictly to the official naming convention — otherwise the macro will not be resolved.

Address macros (CamelCase)

Macro Meaning
_Name Surname
_Vorname First name
_Email Default email address
_Email(Art,n) Email by type (business/private) and position
_Strasse Street
_PLZ Postcode
_Ort Town/City
_Telefon Standard telephone number
_AdrDatensatznummer Address record number
_Uuidaddress Address UUID
_Sonstige1 Content of the ‘Other1’ field

Property macros (small)

Macro Meaning
_objektart Property type (house, flat, etc.)
_objekttyp Property category (detached house, terraced house, etc.)
_ort Location of the property
_strasse Street (only if “Address sharing” is active in the property)
_hausnummer House number (only if “Address sharing” is active in the property)
_Objstrasse Street — bypasses “Do not share address” (workaround, only for street + house number)
_Objhausnummer House number — bypasses “Do not share address”
_plz Postcode
_kaufpreis Purchase price
_wohnflaeche Living space
_flaeche Standard area per property type
_ObjDatensatznummer Property record number
_Uuidestate Property UUID

Date & Time Macros

Macro Meaning
_Datum(format) Variable date format — _Datum(DD.MM.YYYY)
_KDatum Current date (e.g. 26.04.2026)
_Uhrzeit(Länge, Format, Zone) Current time

Function macros (conditions, calculations)

Macro Example Meaning
_calculate(...) _calculate([kaufpreis]*3) Mathematical calculation
_ifEmpty(_makro;"Text1";"Text2") _ifEmpty(_Sonstige1;"Standard";_Sonstige1) If macro is empty → Text1, otherwise Text2 (also written as _if_empty(...))
_if(Bedingung;"Text1";"Text2") _if([objektart]="haus";"Haus-Anfrage";"Andere") Conditional output
DATEADD([feld];n;"d") _calculate(DATEADD(TODAY();14;"d")) Add n days to the date (d/w/y)
TODAY() _calculate(TODAY()) Today

> 💡 _ifEmpty with user fields — multi-office pattern: If each location/office has its own review link, telephone code or similar, create a custom field for the user (e.g. Benutzerzusatz1Name) and use: _ifEmpty(_OBJBetreuer_Benutzerzusatz1Name;"https://fallback-link.de";_OBJBetreuer_Benutzerzusatz1Name) — if the supervisor has left the field blank, the fallback applies. Shorter and more readable than _calculate(IF([feld]=null;"a";"b")) for simple empty checks.

User macros (employee performing the action)

Macro Meaning
_UserAdr* Placeholder for any address macro of the current user — e.g. _UserAdrName, _UserAdrEmail, _UserAdrTelefon
_Benutzervorname / _Uservorname User’s first name
_Benutzername / _Username User’s surname
_Benutzeremail / _Useremail User’s email address

propform-specific macros

These macros are only available in propform.io — not in standard onOffice. They work in forms as well as in activities, tasks and emails written via propform (macro resolution mode “alternative” in onOffice).

Buttons & Links in Description Fields

Macro Description
_pfButton("Label", "URL", "Style", "Target") Fully styled button in the propform design. Styles: rounded, rounded-0, rounded-pill. Target: _parent or _blank.
_pfLink("URL", "Label", "Target") Simple hyperlink. If no label is specified, the URL is used as the link text.

Examples:

_pfButton("Weiter zum Formular", "https://example.com", "rounded-pill", "_blank")
_pfLink("https://example.com", "Hier klicken", "_blank")

Search criteria macros

Macro Description
_pfGetSearchCriteriaInformation Outputs the complete search criterion in tabular form.
_pfGetSearchCriteriaField(Feldname) Outputs a single value from the search criterion, e.g. _pfGetSearchCriteriaField(objektart)
_pfGetSearchCriteriaUUID Encrypted UUID of the search criterion (for secure cross-form links — e.g. in ‘Edit’ and ‘Deactivate’ buttons in overview emails)

> 💡 Self-service pattern for search profiles: These three macros, together with _pfButton(...) and the loop _bScRek_("status:1"), form a complete self-service workflow: Overview email lists all active search profiles + one-click buttons for editing/deactivating. Complete setup under Edit / deactivate search profiles.

File path macros (for images/signatures in PDF templates)

Macro Description
_dateipfadAdressfeld(<Feldname>;<Breite>;<Höhe>;<Einheit>;<Typ>) Inserts the image from an address file field into the PDF template (typically for signatures, ID scans)
_dateipfadObjektfeld(<Feldname>;<Breite>;<Höhe>;<Einheit>;<Typ>) Similarly for property file fields

Parameters:

  • Field name: internal onOffice field name of the file field (e.g. unterschrift_kaeufer)
  • Width: value in the selected unit (e.g. 400 — default value for signatures)
  • Height: either a fixed value or variabel for auto-height
  • Unit: px or mm
  • Type: mail or html

Example — embedding a buyer’s signature:

_dateipfadAdressfeld(unterschrift_kaeufer;400;variabel;mail;html)

Multi-sig pattern for multiple buyers/owners:

Within the address loop (_buyerbrek_1__buyererek_1_, see below), you can embed a separate file field with a signature for each buyer. If not all buyers have signed yet, always wrap with _ifEmpty(...) — otherwise a gap will appear in the PDF:

_buyerbrek_1_
_BuyerVorname _BuyerName
_ifEmpty(unterschrift_kaeufer;"";"_dateipfadAdressfeld(unterschrift_kaeufer;400;variabel;mail;html)")
_buyererek_1_

> 💡 File field availability: File path macros only work if the file is located in an onOffice file field of the record — not in the general ‘Files’ tab. The file field must be created in onOffice Administration before use.


Activity & Appointment Macros

Macro Description
_pfGetAgentslogInformation Outputs the activity just entered via propform in tabular form (action type, action category, comment)
_pfGetSellingPriceOffer Displays the purchase price offer submitted by the prospective buyer
_pfGetCalendarUUID Encrypted UUID of the current appointment (within the calendar loop)

Deep links to onOffice-enterprise

Macro Description
_getAddressLink Direct deep link to the address record in onOffice — only works for logged-in users
_getEstateLink Direct deep link to the property

Newsletter & Agreement

Macro Description
_NewsletterDOILink onOffice standard macro: confirmation link for newsletter double opt-in. If the newsletter field is set to 3 (DOI pending) and the user clicks, it is set to 1 (confirmed). Used in the newsletter confirmation email.
_AgreementLink(Parameter1,Parameter2,...) propform macro for the agreement link (contract/cancellation policy/privacy policy). Parameters control which content is displayed when the agreement is called up. Possible parameters: URL, Vertrag, Belehrung, Musterwiderruf, Datenschutzerklärung, Beginn, Eigentum, Finanzierung, Newsletter.
_NewsletterLink onOffice default: Subscribe/unsubscribe link for newsletter distribution list (clicking opens the subscribe/unsubscribe page in onOffice).

> 💡 Agreement link tip: Instead of fixed parameters in the email template, you can maintain a custom field in the property (e.g. agreement_link_parameter) and use a formula to dynamically supply different parameters there — e.g. no contract/cancellation for commission-free properties. The email template then only calls _AgreementLink(_agreement_link_parameter).

Address macro resolution mode “alternative”

In the propform email configuration, there is the setting “Address macro resolution: normal vs. alternative”:

Mode Effect
Normal (default) _Vorname, _Name, _Email etc. resolve to the email recipient
Alternative Resolution takes place to the form address (= the address that has just processed the form)

When is it “alternative”? Whenever the email is sent to someone who is not the enquirer — e.g. an internal notification to accounts regarding a new address. Otherwise, accounts data would appear in the email instead of the enquirer’s data.

---

Loops — Search criteria loop

With _bScRek_ and _eScRek_, you can iterate through all search criteria for an address and output macros for each individual search criterion — similar to the familiar estate agent book loops in onOffice.

Syntax

_bScRek_("filter")
   ... beliebige Suchkriterien-Makros ...
_eScRek_

Optional filter

The filter argument allows you to restrict which search criteria are taken into account:

_bScRek_("status:1")

→ Active search criteria only (Status = 1).

Complete example

_bScRek_("status:1")
Objektart: _pfGetSearchCriteriaField(objektart)
Ort: _pfGetSearchCriteriaField(ort)
Wohnfläche: _pfGetSearchCriteriaField(wohnflaeche)
Link: _pfLink("https://example.com?id=_pfGetSearchCriteriaUUID", "Suchkriterium öffnen")
_eScRek_

Loops — Calendar Loop

_bCalendarRek_ and _eCalendarRek_ allow you to iterate through events in the specified time period — e.g. to display available slots in a booking form.

Syntax

_bCalendarRek_("startDate:YYYY-MM-DD;endDate:YYYY-MM-DD;weitere:filter")
   ... beliebige onOffice-Termin-Makros + _pfGetCalendarUUID ...
_eCalendarRek_

Example filter

_bCalendarRek_("startDate:2026-02-25;endDate:2026-12-31;subject:like:%TERMIN-SLOT%;estate.id:_Id")

→ All appointments within the period whose subject contains “APPOINTMENT-SLOT” and which are linked to the current property.

Dive deeper

You can find detailed instructions with copy/paste prompts on the blog: Calendar-Loop Filter Guide.


Loops — Address Loop (Buyers / Owners)

The address loop macros allow you to cycle through all buyers or owners associated with the property — a typical use case: an overview form listing all individuals associated with a property, plus ‘Edit’/‘Link more’ buttons.

Syntax

Loop Start End
Buyers _buyerbrek_1_ _buyererek_1_
Owners _ownerbrek_1_ _ownererek_1_

> Within the loop, you use the pre-macros _Buyer* and _Owner* (see next section). _1_ is an internal loop counter — only increment it if you need multiple independent buyer/owner loops within the same description field.

Example — listing all buyers of a property

_buyerbrek_1_
_BuyerVorname _BuyerName, _BuyerStrasse, _BuyerPLZ _BuyerOrt, _BuyerEmail
_buyererek_1_

📖 Full tutorial with overview + editing form and code examples: Linking multiple records with a form

---

Pre-macros (accessing linked records)

Pre-macros access address records that are linked to a property — typically within PDF templates, emails or address loops.

Pre-macros for buyers

Macro Meaning
_BuyerVorname Buyer’s first name
_BuyerName Buyer’s surname
_BuyerTitel Title (e.g. Dr.)
_BuyerStrasse, _BuyerPLZ, _BuyerOrt Address
_BuyerTelefon, _BuyerEmail Contact
_BuyerName2, _BuyerVorname2, _BuyerStrasse2 etc. Master data 2 (second address within the record — if enabled in onOffice)
_BuyerUuidaddress UUID of the buyer address record (for cross-form links)
_Kaeufer / _Buyer Pre-macro prefix in PDF templates, e.g. _KaeuferVorname (without an underscore between the prefix and the field name)

Pre-macros for owners

Macro Meaning
_OwnerVorname Owner’s first name
_OwnerName Owner’s surname
_OwnerTitel Title
_OwnerStrasse, _OwnerPLZ, _OwnerOrt Address
_OwnerTelefon, _OwnerEmail Contact
_OwnerName2, _OwnerVorname2, _OwnerStrasse2 etc. Master data 2
_OwnerUuidaddress UUID of the owner address record
_Eigent / _Owner Pre-macro prefix in PDF templates, e.g. _EigentVorname (without an underscore between the prefix and the field name)
_Mieter / _Renter Pre-macro prefix for tenants, e.g. _MieterVorname

> 💡 Buyer/Owner vs. Kaeufer/Eigent: _Buyer*/_Owner* are primarily used within address loops and in the description field. _Kaeufer*/_Eigent* (with German names) are the classic pre-macros from PDF templates that onOffice understands directly. For PDF templates → see Values are not transferred to the PDF.


Direct access to contact type links

Instead of cycling through all linked addresses for a property, you can also address a specific contact type directly — e.g. the solicitor or the property management for that property:

_XAPKontaktart#NAME#FELD
Example Meaning
_XAPKontaktart#Notar#Name Surname of the address linked to the ‘Notary’ contact type
_XAPKontaktart#Notar#Email Notary’s email
_XAPKontaktart#Notar#Uuidaddress UUID of the notary address record
_XAPKontaktart#Verwalter#Telefon Telephone number of the management
_XAPKontaktart#indMulti28075Select28075#Firma1 Company name of the address with the specific key value (for custom contact type options)

> 💡 Finding the key value: You can find the exact name of the contact type in onOffice under Tools → Settings → Administration → Addresses → ‘Contact type’ field → the key value is listed next to the respective option (often indXXXX).


Pre-loading UUIDs without a field in the form

Even if a form contains no address or property fields, you can “pass along” a record via a URL parameter — the activity created after submission is then linked to this record.

https://formular.deine-domain.de/dokumenten-upload?address[ID]=_Uuidaddress&estate[Id]=_Uuidestate

Use case: A document upload form for a tenant (address) that is still intended to retain a property reference — the uploaded file and the activity are then linked to both records, even if the form itself only contains file upload fields.

> 💡 Also works for _AgreementLink calls and all instances where propform expects UUID parameters.


Continue to Emojis & Symbols for onOffice 👉