PowerApps - JackHu88/Comm GitHub Wiki
微软证书
https://www.microsoft.com/en-us/learning/dashboard.aspx https://mcptnc.microsoft.com/transcript
注册 Power Apps 社区计划
https://docs.microsoft.com/zh-cn/powerapps/maker/dev-community-plan
PowerApps Community
https://powerusers.microsoft.com/t5/Power-Apps-Community/ct-p/PowerApps1
PowerApps Docs
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/formula-reference
https://powerapps.microsoft.com/zh-cn/tutorials/getting-started/
https://docs.microsoft.com/en-us/powerapps/getting-started
UpdateIf
https://docs.microsoft.com/en-us/powerapps/functions/function-update-updateif
Update Choice field
UpdateIf(PowerAppsForm, ID=DataTable1.Selected.ID,{Form_x0020_Status:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:1,
Value:"Approved"}
})
PowerApps Submit form trigger Flow
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows
Update User Field
UpdateIf(PowerAppsForm, ID=DataTable1.Selected.ID,{Owner:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & Lower(User().Email),
Department:"", DisplayName:User().FullName,
Email:User().Email,
JobTitle:".",
Picture:"."}
})
http://www.codeovereasy.com/2017/07/powerapps-set-sharepoint-person-field-to-current-user/
https://powerusers.microsoft.com/t5/PowerApps-Forum/SharePoint-List-Update-Person-Field/td-p/6980
Patch
https://docs.microsoft.com/en-us/powerapps/functions/function-patch
Patching Sharepoint list from checkbox
Calling Microsoft Flow from your application
https://flow.microsoft.com/en-us/blog/call-flow-restapi/
Return data to PowerApps from a flow
https://flow.microsoft.com/en-us/blog/return-data-to-powerapps/
Return Array from Flow to PowerApps
https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/
Set user field in edit form
https://www.c-sharpcorner.com/article/set-default-value-to-person-or-group-field-in-powerapps/ "Default" & "DefaultSelectedItems" Property
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
DisplayName:User().FullName,
Claims:"i:0#.f|membership|" & Lower(User().Email),
Department:"",
Email:User().Email,
JobTitle:"",
Picture:""
}
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
DisplayName:LookUp(ApplicationInventory,'Application Name'= DataCardValue2.Selected.Value,ApplicationOwner.DisplayName),
Claims:"i:0#.f|membership|" & Lower(LookUp(ApplicationInventory,'Application Name'= DataCardValue2.Selected.Value,ApplicationOwner.Email)),
Department:"",
Email:LookUp(ApplicationInventory,'Application Name'= DataCardValue2.Selected.Value,ApplicationOwner.Email),
JobTitle:"",
Picture:""
}
New Model
If(Text(Form1.Mode)="1",{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:Concatenate("i:0#.f|membership|",User().Email),
DisplayName:User().FullName,
Email:User().Email
},
ThisItem.PersonGroup)
0 – Edit Mode
1 – New Mode
2 – Display Mode
//set value before submit form
You can set the default value to the variable in the OnSave property under SharePointIntegration.
Example:
If(
SharePointForm1.Mode=New,
Set(varDefault, User().FullName)
);
SubmitForm(SharePointForm1)
Then in the Default/DefaultSelectedItems property on the field control, put
If(IsBlank(varDefault),ThisItem.[FieldName],varDefault)
From <https://sharepoint.stackexchange.com/questions/283151/set-a-list-item-value-before-submit-on-a-new-form-in-powerapps>
//Display Mode
If(SharePointForm1.Mode=New,Edit,View)
//get choice value
ThisItem.Column Name.Value
From <https://anjanjot.com/powerapps-continued/>
//set choice field
If(
EditForm1.Mode = FormMode.New,
{ Value: "Morning" },
Parent.Default)
From <https://powerusers.microsoft.com/t5/Building-Power-Apps/Setting-a-default-value-for-a-choice-field/td-p/127001>
//
If(!Form1.Valid, SubmitForm(Form1), Navigate(CustomFormScreen2));
From <https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Form-validation-without-Submission/idi-p/134725>
//
Blank()
From <https://powerusers.microsoft.com/t5/Building-Power-Apps/IsBlank-IsEmpty-or-quot-quot/td-p/180395>
//Update user filed
If(IsBlank(varOwner),Parent.Default,{Claims: varOwner}))
Create a Custom Form
http://simplesolutions365.com/how-to-create-a-custom-form-and-workflow-using-powerapps-and-flow/
https://powerapps.microsoft.com/en-us/blog/separate-custom-forms/
In the “OnNew” field put the following formula:
Set(SharePointFormMode, “CreateForm”); NewForm(CreateItemForm); Navigate(CreateScreen, ScreenTransition.None)
In the “OnEdit” field put the following formula:
Set(SharePointFormMode, “EditForm”); EditForm(EditItemForm); Navigate(EditScreen, ScreenTransition.None)
In the “OnView” field put the following formula:
Set(SharePointFormMode, “ShowForm”); ViewForm(ShowItemForm); Navigate(ShowScreen, ScreenTransition.None)
Now, to ensure the submission and cancellation process works correctly we must expand the more options button so that there are OnSave and OnCancel fields.
In the “OnSave” field put the following formula:
If(SharePointFormMode=”CreateForm”, SubmitForm(CreateItemForm), If(SharePointFormMode=”EditForm”, SubmitForm(EditItemForm)))
In the “OnCancel” field put the following formula:
If(SharePointFormMode=”CreateForm”, ResetForm(CreateItemForm), If(SharePointFormMode=”EditForm”, ResetForm(EditItemForm)))
Connect DB2
https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-install https://powerusers.microsoft.com/t5/Building-Power-Apps/Help-connecting-IBM-DB2-database-to-powerapps/td-p/39975 https://powerusers.microsoft.com/t5/Building-Power-Apps/Need-to-connect-to-a-DB2-database-How-to/td-p/331308/page/2
Server: XXXXX.YY.COMPANY.COM:446 Database: this should only be the server name ( i think the localname of the machine)