Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
infoplus
canvas-docs
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Expression
Jump to bottom
marstone edited this page
May 23, 2022
·
4 revisions
概述
本文档语法适合各种支持表达式的字段
当字段既支持常量也支持表达式时(如Page.text),使用“=”开头表示是表达式
Variables/变量
根实体
当前上下文根实体即为当前数据实体
比如一个用户列表页面行操作的上下文即为该行"用户",可使用 $name 直接引用该"用户"的"姓名"(name)字段的值
$字段名
用于直接引用根实体中的对象的值
$ITEM
当前数据实体,同根实体,但如无特别声明,不包含后面提到的其他内置变量。
$INDEX
当前行下表,第一行下标为0。包含在$ITEM中
$SELECTED
当前行是否处于选中状态。包含在$ITEM中
$TOTAL
当前数组总量
$DATA
表示当前Content的数据
$USER
当前登录用户
$APP
当前应用的环境变量
$QUERY
当前连接字符串
$CONDITION
当前上下文中,如果存在条件控制,此变量暂存条件表达式的执行结果
Functions/函数
标准函数库
支持大部分的 Javascript 标准函数/全局对象,比如 Math/Date/JSON。参考:
Global_Objects
CTL(字段名: String!)
取控件
RES(资源类型/路径: String!)
取资源
SUM(对象,条件)
COUNT(对象,条件)
UUID()
随机生成一个新的 UUID 字符串
Wiki pages
Pages
12
Loading
Home
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
ACL
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Bus
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
CanvasApp
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
DataType
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Expression
概述
Variables/变量
根实体
$字段名
$ITEM
$INDEX
$SELECTED
$TOTAL
$DATA
$USER
$APP
$QUERY
$CONDITION
Functions/函数
标准函数库
CTL(字段名: String!)
RES(资源类型/路径: String!)
SUM(对象,条件)
COUNT(对象,条件)
UUID()
Loading
Filter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Gateway
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
MQ
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Provider
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Role
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Service
Uh oh!
There was an error while loading.
Please reload this page
.
Clone this wiki locally
You can’t perform that action at this time.