On this page
Rule context reference
Look up actor, post, request and payment variables.
Before you begin: Schema reference.
Runtime Variables
| Variable | Available in |
|---|---|
$post.current.id / $post.pending.id | Current generated post id. In a user hook, use $user.id. |
$post.current.data | saved post data during get, edit, and delete checks |
$post.current | post metadata for the saved post, such as id, type, author id, and status |
$post.pending.data | the data that will be saved during create and edit |
$post.pending | post metadata for the pending write, including the generated id during create |
$payment | payment event handlers |
$user | affected user inside user hooks: $user.id, safe $user.current/$user.pending identity and custom data, plus $user.changes during edit |
$action | current rule operation metadata, including requested read filters at $action.where, the current payment event at $action.payment, and booleans such as isCreate, isGet, isRead, isList, isEdit, isDelete, isWrite, and isSignIn |
$actor | requester data, including $actor.id, $actor.email, $actor.name, $actor.data, $actor.wallet, $actor.isGuest, $actor.isSignedIn, $actor.isAdmin, $actor.isEndpoint, and $actor.endpoint |
$admin | content permission helpers for FRL-managed posts |
$request | endpoint request data. Helpers that read $request can only be called from endpoint blocks. |
$secret | secret values referenced by FRL; fb-admin automatically creates Secret Keys fields for referenced keys |
$page | Effective page settings: the selected theme version’s HTML defaults with the admin’s saved edits applied. Available before the first page edit. |
$siteInfo | public site information supplied by Frontbacked: $siteInfo.name is the first word of the site name, $siteInfo.fullname is the complete name, and $siteInfo.logoUrl is its logo |
$currency | platform currency config; $currency.value is the selected code and $currency.mode is currently fixed |
$this | current post type metadata, including $this.name, $this.fields.status.enums.published, $this.fields.status.default, and $this.fields.status.hasEnum(value) |
$context | scratch data for the current rule run; writable in hooks, endpoint bodies, event blocks, and jobs, readable in allow rules and helpers. Deep assignments create missing parent objects. See Build nested scratch data. |
$local | scratch data inside one helper function call or job run; deep assignments also create missing parent objects. Return a helper value to pass it back to the caller. |
| Action | $post.current | $post.pending |
|---|---|---|
create | Empty. | New post data and generated metadata. |
edit | Saved post before the edit. | Data that will be saved after the edit. |
delete | Saved post being deleted. | Empty. |
get | Saved post being fetched. | Empty. |
list | Not available in list permissions because rows are not loaded yet. | Empty. |
Continue with Secrets and operators reference.