Core Description
Function argRecordRef
fcf.Arg argRecordRef(string a_arg)
Returns an object with information about the template argument that references the entry element of the group output template that performs rendering via the view () method, such as tables, sheets, and others.
Source file
fcf:fcf.js
Namespace
fcf
Arguments:
string a_arg - The name of the property in the record that the template argument refers to.
Return value:
fcf.Arg
Examples
Example 1
//~TEMPLATE
@{{
render.template(
"@controls:table",
{
value: [
{ index: 1, value: "first" },
{ index: 2, value: "second" },
],
columns:[
{
alias: "result_value",
title: "Result",
type: "string",
value: fcf.argVal("@{{args.___index}}@ - @{{args.___value}}@"),
___index: fcf.argRecordRef("index"),
___value: fcf.argRecordRef("value"),
},
{
alias: "index",
title: "Index",
type: "string",
mode: "edit",
},
{
alias: "value",
title: "Value",
type: "string",
mode: "edit",
},
],
});
}}@
Result:
The output result of the table is shown below. When changing the Index and Value fields, the value of the Result column is automatically changed, thanks to the use of the fcf.argRecordRefreference