@BRT.UserRecord

Sets the identity of a user upon login

This Helper sets the identity of the user and is typically used following successful authentication using @BRT.LoginForm().  It uses the 'fields:' and 'viewId:' parameters to retrieve User information.
See also: @BRT.LoginForm()
Required Parameters
fields: A list of fields values retrieved from a View
Example: fields: new[] {"PrimaryImage","Name","Summary,"Description"}
The fields: parameter is used retrieve field values from EngineRecord items.  It is used in several Helpers and it is always dependent on the viewId: parameter.
This parameter creates an array of values based based on field Id names available in the View that is indicated by the viewId parameter, using the following syntax.
fields: [ ] {"field Id", "fieldId", "fieldId" "fieldild",...}
Each "field Id" must indicate a valid Column Id, Category Id, CustomField Id or Relationship Id in the relevant View.
For a Column Id, Category Id or CustomField Id use the Id in quotes: fields:[] {"Type","BoardTitle","Name"}
For a Relationship Id, there are two uses.
  1. The RelationshipID in quotes:  fields:[] {"Authors"}
  2. The RelationshipID followed by ID's of fields of child elements, in quotes: fields:[] {"Authors.Name", "Authors.PrimaryImage","Authors.Summary"}
A Helper will fail if the fields: parameter includes a field Id not included in the View named in the ViewId: parameter
For example, if your system includes a View named "Employees"  and that view creates a Custom Field with a CustomField Id of "DateOfHire", the following BRT.Index Helper will fail:
@BRT.Index(tableId:"Contacts", viewId:"People",
                    fields: new[] {"Name", "PrimaryImage","Email","DateOfHire"} ...
because the People View does not include "DateOfHire" field.
The following BRT.Index Helper will succeed:
@BRT.Index(tableId:"Contacts", viewId:"Employees",
                    fields: new[] {"Name", "PrimaryImage","Email","DateOfHire"} ...
viewId: Indicates the View which contains the record set to be targeted by the Helper
Example: viewId:"BlogPosts"
The viewID: parameter indicates the View targeted by the Helper. The View can be either visible or invisible to users in the Web Console.
Optional Parameters
condition: Adds a condition to filter records retrieved
Example: condition: (String.IsNullOrEmpty(Request.QueryString["topic"])?null:ConditionMeta.Parse("[Topic.Label]='" + Request.QueryString["topic"] + "'"))
The condition: parameter applies a search or filter condition to limit the EngineRecords retrieved from View named in the Helper's viewId: template.
savedFilters: Applies a saved filter from the View definition
Example: savedFilters:new[] {"LocalNews"}
The savedFilters: parameter names one or more saved filters to be applied to the EngineRecords returned by a Helper.  Values must indicate valid FilterId names included in the definition of the View named in the Helper's viewId: parameter.