Support > Repository > Form > Placeholder
ja | en

Describe the format, rules, and notation examples of placeholders described in the template file.

"Placeholder" can be prepared in the template file.The actual data is stored in that item.

The format of the placeholder is as follows.

In the detailed display template file, "_p" is appended to the model name for distinction.In the list display template file, add "_lp" to the model name.

$ {Model name _ p. English item name}

Specific examples of placeholders

I will take an item "name" (customername) of the model "customer" as an example here.

In place place notation, first add "_ p" to the end of model name.Give it a ".", Followed by the English item name.Finally, add "$ {" at the beginning of this string and "}" at the end.

In this example it will be "$ {customer_p.customername}". The portion in which this notation is embedded in the template file is replaced with the customer name data contained in the database.

Here are a few rules about placeholders.

(1) Enter placeholder names in half-width alphanumeric characters.

Even if you specify a placeholder with double-byte characters, it will not be replaced correctly.

(2) If the corresponding data does not exist, it is replaced with the "blank" character.

If the value of the item corresponding to the placeholder is not stored in the data, the placeholder is replaced with a space character.

(3) Items for which authorization has been set are valid (same setting) even in the form.

If you set the authority for each item, it is also valid in the form.For exampleI set a hidden privilege for an item, It will not be output in the form as well.(Placeholders are replaced with whitespace characters.)

(4) Multiple placeholders for one item can be described in different places.

For example, place a placeholder called $ {customer_p.customername}PluralIf you do, all placeholders will be replaced.

(5) Placeholders are applied only to the first sheet (of an Excel file).

Placeholders apply only to the first sheet.Placeholders are not applied after the second sheet. Using this rule,Create complicated layoutYou can also.

(6) Placeholders and other characters can be mixed.

Placeholders and other normal characters can be mixed.Only placeholders are replaced and other strings are kept intact.Example: "The customer name is $ {customer_p.customername}."

For the detailed display model (the one ending in "_ p"), ​​the placeholder notation method for each data type and data type is shown.

String type/numeric type/date type

The value of the item in the model is posted.

Inscription $ {Model name _ p. Item name}
An example ${customer_p.name}

Numeric type (output format)7.4.2

Numeric fields are standard and output formats are not applicable. SpecifiedOutput formatIf you want to output the value to which you applied the prefix fmt:.

Inscription ${fmt:Model name _ p. Item name}
An example ${fmt:sale_p.uriage}

Date type (serial value)

Date type items are standard,Output formatWill be applied. Disable this output format and set the value of the item in the model toAs Excel serial valueWe have options to output.Give the prefix e:.

Inscription ${e:Model name _ p. Item name}
An example ${e:customer_p.date}
With serial values, you can set any date format (provided by Excel) in the Excel form template file.

Model reference

The "content part" of the referenced model is posted.

Inscription $ {Model name _ p. Item name}
An example ${customer_p.ctype}

Model reference (ID part)

If "#id" is appended to the item name, the "ID part" of the referenced model is posted.(The list display is not supported.)

Inscription $ {Model name _ p. Item name # id}
An example ${customer_p.ctype#id}

Repeat item

The value of the repetition item corresponding to the subscript is posted.Subscript starts from "0".

Inscription $ {Model name _ p. Item name. Subscript}
An example ${customer_p.email.0}

Repetitive container (fixed length)

The value of the container field corresponding to the subscript is posted.Subscript starts from "0".Detail is"Fixed length specification of repeating itemsPlease read.

Inscription $ {Model name _ p. Container name. Subscript. Item name}
An example ${customer_p.report.0.rid}

Repetitive container (variable length)

The form image will stretch according to the number of output.Detail is"Variable length specification of repeat itemsPlease read.

Write it in one line.(It can not be written over multiple lines.)

Inscription $ {Model name _ p. Container name. # Item name}
An example ${customer_p.report.#.rid}

Data value of the referenced model

The data value of the referenced model is posted. For items that do not directly reference the item, you can also post data of any item of the reference model in the following way.

Inscription $ {Own model name _ p. Item name. Reference destination model name _ p. Item name to be referred to}
An example ${management_p.name.customer_p.companyname}

The data value of the child model when the referenced model is linked with foreign key

The data value of the child model is posted when the referenced model is a foreign key linkage.

Inscription $ {Own model name _ p. Item name. Reference destination model name _ p -> child model name of the referenced model suffix. Child model name of the referenced model _ p. Item name to be referenced}
An example ${management_p.name.customer_p->support.0.support_p.supportdate}

Data value of repeating container of child model when external key is linked

The data value of the repeating container in the child model is posted when foreign key is linked.

Inscription $ {Your model name _ p -> child model name of the referenced model, suffix. Child model name of the referenced model _ p. Container name. Subscript. Item name}
An example ${customer_p->support.0.support_p.report.0.supportdate}

Data value of repeating container of child model when referenced model is external key linked

The data value of the repeating container in the child model is posted when the reference destination model is linked with foreign key.

Inscription $ {Own model name _ p. Item name. Reference model name _ p -> child model name of the referenced model suffix. Child model name of the referenced model _ p. Container name. Subscript. Item name}
An example ${management_p.name.customer_p->support.0.support_p.report.0.supportdate}

Image (file type)7.6

File type items can be handled as follows.

file name

Inscription $ {Model name _ p. Item name}
An example ${customer_p.photo}
$ {Customer_p.report.0.photo} Repetitive container (fixed length)
$ {Customer_p.report. #. Photo} Repetitive container (variable length)

File path

It is relative to the upload_dir folder.

Inscription $ {Model name _ p. Item name_jshfilename}
An example ${customer_p.photo_jshfilename}
$ {Customer_p.report.0.photo_jshfilename} Repetitive container (fixed length)
$ {Customer_p.report. #. Photo_jshfilename} Repetitive container (variable length)

image

Embed the image in the cell.The supported formats are jpeg, png.

Inscription $ {Model name _ p. Item name_jshfilename:image}
An example ${customer_p.photo_jshfilename:image}
$ {Customer_p.report.0.photo_jshfilename: image} Repetitive container (fixed length)
$ {Customer_p.report. #. Photo_jshfilename: image} Repetitive container (variable length)

※ You can not specify the size of the image.The uploaded image is embedded as it is.

For the list display model (the one ending in "_lp"), the notation method of placeholders for each data type and data type is shown.

Subscript starts from "0".This subscript uses a wild card called "#", not a number.Repeat (0) to generate a line with this placeholder.

String type/numeric type/date type

The value of the item in the model is posted.

Inscription $ {Model name _ lp. Item name. Subscript}
An example ${customer_lp.name.#}

You can also use "e:" designation of date type item and "fmt:" designation of numeric type item.

Image (file type)

Like the character string type, specify "#" at the end.Example $ {customer_lp.photo_jshfilename: image. #}

Repeat item

Repeat items are output as ", (comma)" delimiter.

Repeat container

You can not output items in repeating containers.(JOIN functionYou can prepare an output item internally prepared by repeating containers into "one" character string using it and use it in the form.

Number of search results

In the case of list display, the number of search results is posted, and in the case of download, the number of lines counted after download processing is posted.

Inscription ${resultsize}
An example (Same notation)

Search condition value

The values ​​of the search conditions listed are posted.Search conditions can be referred to by giving the character "_cp" to the model name.

Inscription $ {Model name _ cp. Item name}
An example $ {Customer_cp.ctype} # 1
$ {Customer_cp.refitem} # 2
$ {Customer_cp.refitem # id} # 3

※ 1 is a normal item.
※ 2 is the content part of model reference item.
※ 3 is the ID part of the model reference item.

Search condition value (repeating container)

When a search condition includes a repeating container,Exclude the container name.

Inscription $ {Model name _ cp. Item name excluding container}
An example The item field in the repeating container cont is used as a search condition and this is included in the list form.
${customer_cp.field}

Search condition value (range search item)

The value of the range search condition being listed is posted.Add "1jshparam", "2jshparam" to the end of the item name.

Inscription Starting value: $ {model name _ cp. Item name 1 jshparam}
End value: $ {model name _ cp. Item name 2 jshparam}
An example ${customer_cp.cdate1jshparam}
${customer_cp.cdate2jshparam}
The value of the search condition value is set at the timing of search processing.Even if you enter search conditions on the screen, if you output the list display without performing search processing, placeholders for search conditions will be empty.

Either the detailed display or the list display can be used.

User account

The logged on user account name is posted.

Inscription ${username}
An example (Same notation)

Date created

The date and time the form was created (output) is posted.

Inscription ${createdate}
An example (Same notation)
  • For repeated containers, the maximum number of lines that can be output is 65,536 lines.