Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
typo3
qfq
Commits
84e57068
Commit
84e57068
authored
1 year ago
by
enured
Browse files
Options
Downloads
Patches
Plain Diff
F15098: Added documentation for function column. refs #15098
parent
3906ea81
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!638
Merge Develop to B16343
,
!637
develop into F17086-Multiple-Forms-on-a-page
,
!626
New version v23.10.1
,
!621
F15098 as function in variable
Pipeline
#10773
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/Variable.rst
+45
-5
45 additions, 5 deletions
Documentation/Variable.rst
with
45 additions
and
5 deletions
Documentation/Variable.rst
+
45
−
5
View file @
84e57068
...
...
@@ -44,7 +44,7 @@ provided. Access to:
* :ref:`store-variables`
* :ref:`sql-variables`
* :ref:`row-column-variables`
* :ref:`link-column-variables`
* :ref:`link-
function-
column-variables`
Some examples, including nesting::
...
...
@@ -72,6 +72,12 @@ Some examples, including nesting::
# Link Columns
{{p:form=Person&r=1|t:Edit Person|E|s AS link}}
# Function Columns
{{getFullname(pId) => fullname AS function}}
# Function Columns > direct tt_content output
{{getFullname(pId) AS function}}
Leading and trailing spaces inside curly braces are removed.
* ``{{ SELECT "Hello World" }}`` becomes ``{{SELECT "Hello World"}}``
...
...
@@ -421,10 +427,13 @@ General note: using this type of variables is only the second choice. First choi
:ref:`access-column-values`) - using the STORE_RECORD is more portable cause no renumbering is needed if the level keys change.
.. _`link-column-variables`:
.. _`link-
function-
column-variables`:
Link column variables
---------------------
Link/Function column variables
------------------------------
Link column
^^^^^^^^^^^
These variables return a link, completely rendered in HTML. The syntax and all features of :ref:`column-link` are available.
The following code will render a *new person* button::
...
...
@@ -435,7 +444,38 @@ For better reading, the format string might be wrapped in single or double quote
{{"p:form&form=Person|s|N|t:new person" AS link}}
These variables are especially helpful in:
Function column
^^^^^^^^^^^^^^^
These variables execute a qfqFunction::
// Report with qfqFunction. Subheader: getFullname
render = api
10 {
sql = SELECT CONCAT(lastName, ', ', firstName) AS _fullname
FROM Person
WHERE id = {{pId:R0}}
}
// Usage function column
{{getFullname(pId) => fullname AS function}}
{{SELECT '{{fullname:RE}}'}}
Usually it is preferred to get the output from a function without using the variable {{_output:RE}}::
// Report with qfqFunction. Subheader: getFullname
render = api
10 {
sql = SELECT CONCAT(lastName, ', ', firstName)
FROM Person
WHERE id = {{pId:R0}}
}
{{getFullname(pId) AS function}}
These two column variables are especially helpful in:
* `report`, to create create links or buttons outside of an SQL statement. E.g. in `head`, `rbeg`, ...
* `form`, to create links and buttons in labels or notes.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment