一、EditForm为新建时设置DataCard字段的默认值
1、文本
If(DetailEditForm.Mode=FormMode.New,myself.FullName,ThisItem.Applicant申请人)
2、时间
If(DetailEditForm.Mode=FormMode.New,Now(),ThisItem.收料日期)
3、人员
If(DetailEditForm.Mode=FormMode.New,{
DisplayName: myself.FullName,
Claims: "i:0#.f|membership|" & myself.Email
},ThisItem.Applicant申请用户)
4、选项
If(DetailEditForm.Mode=FormMode.New,{Value:"待审批"},ThisItem.'Order Status状态')
二、给DataCard通过PowerFx设置值并提交审批
DataCard的Default增加If(IsBlank(varTriggerApproval),ThisItem.是否审批,varTriggerApproval)
同时审批按钮的OnSelect增加Set(varTriggerApproval,true);Set(varNewRecord,SubmitForm(Form5));
三、通过Url中的参数指定打开App时的Sceen及gallery选项
1、App的OnStart中设置
If(
Param("Screen") = "DetailScreen",
Navigate(DetailScreen)
)
2、Gallery的Default中设置
If(IsBlank(Param("ID")),{},LookUp(ShowColumns('Scrap Parts Application Order', "Title","ID"), ID = Int(Param("ID"))))
3、可以通过url访问
https://apps.powerapps.com/play/e/XXXXXXXX&Screen=Screen2&ID=2
标签:Canvas,FormMode,Apps,ThisItem,DetailEditForm,Mode,New,Tips,ID From: https://www.cnblogs.com/liaochifei/p/16745555.html