其他分享
首页 > 其他分享> > Power App用到的一些函数

Power App用到的一些函数

作者:互联网

1、Filter([表名],查询条件&&查询条件),会返回一张表;

2、Search([表名], "值", "字段名"),会返回一张表;

3、LookUp([表名],查询条件),会返回记录类型;LookUp([表名],查询条件,字段名),会返回第三个参数的类型的第一个值;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

4、ResetForm(窗体名),将窗体还原为初始值,新建窗体为空,编辑窗体会还原成刚打开时,返回类型:bool;

5、NewForm(窗体名),将窗体还原为新建窗体,也就是清空,返回类型:bool;

6、EditForm(窗体名),将窗体设置为编辑窗体,需设置item,可在跳转页面前使用,返回类型:bool;

7、ViewForm(窗体名),将窗体设置为不可编辑窗体(展示窗体),需设置item,可在跳转页面前使用,返回类型:bool;

8、SubmitForm(窗体名),将窗体提交,提交成功会返回true,否则会返回false,可以用它判断是否显示提示信息,返回类型:bool;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-form

9、SortByColumns([表名],需要排序的列,"Ascending/Descending",需要排序的列2,"Ascending/Descending"……),会返回一张排序的表;

     SortByColumns([表名],需要排序的列,["列值1","列值2",]),会返回一张表,会将列值1列值2的位置显示到第一第二行记录;

10、Sort([表名],需要排序的列,"Ascending/Descending"),会返回一张排序的表;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-sort

11、UpdateContext({变量名:值,变量2名:值})局部变量赋值;同名会修改;返回类型:bool;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-updatecontext

12、Set(变量名,值)全局变量赋值;同上不能一次赋多个变量,返回类型:bool;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-set

13、Navigate(跳转的屏幕名,跳转的样式(可选),{变量名:值})可传值,返回类型:bool;

14、Back(跳转的样式(可选))可传值,返回类型:bool;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-navigate

15、If(条件,结果,结果1/条件1,结果2,结果3……),返回类型:取决于结果

16、Switch(变量,值,结果,值1,结果1,值2,结果2,……,(如果都不符合)结果default),返回类型:取决于结果

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

17、IsBlank(变量(字符串))空为false,有值为true,返回类型:bool;

18、IsEmpty(变量(表))空为false,有值为true,返回类型:bool;

19、Coalesce(值,值1,值2,值3,值4……)会返回第一个有值的值

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-isblank-isempty

20、Table({列1:"值",列2:"值1"},{列1:"值",列2:"值1"}……)返回一个表;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table

21、Text(需要转换的变量或值)转换为文本,返回类型:文本;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text

22、Value(需要转换的变量或值,(可选转换类型))转换为数值,有字母不行,逗号可以返回类型:数值;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-value

23、User().Email/FullName/Image获取当前用户的记录但是只有电子邮件、全名、图像;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-user

24、With(记录,公式),对记录运行指定公式返回公式的类型,可以将某条记录的几个字段合并逗号隔开,或者运算;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-with

25、Now(),获取当前时间"月/日/年/ 时/分/秒"格式;

26、Today(),获取当前时间"月/日/年/ "格式;

27、DateAdd(日期,增加的天数),在日期上增加多少天;

28、IsToday(日期),判断是否是今天,返回日期类型;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-now-today-istoday

29、Year(日期)/Month(日期)/Day(日期)/Hour(日期)/Minute(日期)/Second(日期)/Weekday(日期),获取当前时间的年份/月份/日期/小时/分钟/秒数/周几,返回数值类型;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-datetime-parts

30、Select(按钮/库)模拟点击事件发生;返回类型bool  

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-select

 31、Language()返回当前系统的语言,手机端的话是设置里的语言,可以搭配MicrosoftTranslator.Translate但是这个Ken由于网络会卡;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-language

32、Len(字符串)获取长度;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-len

33、Upper(字符串)将字符串中字母转为大写;

34、Lower(字符串)将字符串中字母转为小写;

34、Proper(字符串)将字符串中单词的首字母转为大写;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-lower-upper-proper

35、Refresh(数据源)刷新数据源。

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-refresh

36、Launch(字符串),跳转到参数的url界面,也可以用来在手机上跳转电话tel或者其他;

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-param

未完待续

 

 

 

 

标签:canvas,en,Power,docs,App,us,maker,com,用到
来源: https://www.cnblogs.com/ctwpx/p/15919248.html