Hello Fellow Power users,
I created an app to for users to tracker the progression of policies. The data writes to a SharePoint list. However, when the users enter information and save, sometimes the data disappears right after saving or if they go back to the record at a later time.
In order to save, I am currently using a patch function. (See below)
I am concerned because I cannot figure out why their data disappears or is not saving.
The below code is if they are creating a new record.
If(varNewRecord,ClearCollect(colNSPDMTracker,Patch(FedSupremacyTracker,Defaults(FedSupremacyTracker),
{Phase:'Group DropDown_1'.Selected.Value,
Health_x0020_Care_x0020_Specialt:'Occupation Dropdown_1'.Selected.Occupation,
Title:'RPO DropDown_1'.Selected.Title,
OData__x0031_0BRAPPOC:
{'@data.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|"&varCurrentUser.Email,
Department: "",
DisplayName:Office365Users.UserProfileV2(varCurrentUser.Email).displayName,
Email:varCurrentUser.Email,
JobTitle: "",
Picture: ""},
RPO_x0020_POC:{
'@data.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:'NSP Lead ComboBox_1'.Selected.Claims,
Department: "",
DisplayName:'NSP Lead ComboBox_1'.Selected.DisplayName,
Email:'NSP Lead ComboBox_1'.Selected.Email,
JobTitle: "",
Picture: ""},
AUSH:Concat('AUSH ComboBox_1'.SelectedItems,Title,", "),
State_x0020_Variance:'State Variance Toggle_1'.Value,
PreemptingStateRequirements:InvokingSupToggle_1.Value,
Certifications_x0020__x002f__x00: Concat('cert / registration combo box'.SelectedItems,Value,", "),
Federal_x0020_Exemption_x0020_Cl:Concat('Federal Exemption combo box'.SelectedItems,'States and Territories',", "),
Initial_x0020_10BRAP_x002d_RPO_x:'Workgroup Date_1'.SelectedDate,
Workgroup_x0020_Distribution_x00:'Workgroup Email address text'.Text,
NSP_x0020_Workgroup_x0020_Milest:'Current milestone radio_1'.Selected.Value,
CurrentStatus1:{Value:
'current status of milestone - main page - radio_1'.Selected.Value},
NSP_x0020_Workgroup_x0020_Milest0:'Workgroup Milestone completion date'.SelectedDate,
Employment_x0020_Type:'Emp Type Dropdown_1'.Selected.Value,
Occupation_x0020_Code:'Occ Code Text_1'.Text,
Occupation_x0020_Sub_x002d_Code:'Occ Sub-Code Text_1'.Text,
OData__x0023__x0020_of_x0020_Employees:'# of EEs Text_1'.Text,
Nation_x0020_Unions:Concat('National Union Comb bo_1'.SelectedItems,Value,", "),
Non_x002d_National_x0020__x002f_:Concat('Non national combo box_1'.SelectedItems,Value,", "),
Initial_x0020_10BRAP_x002d_RPO_x0:'weekly running notes rich text'.HtmlText})));
The below code is if they are editing an existing record
If(varNewRecord,Concurrent(Set(varNewRecord,false),Set(varcurrentrecordID,First(colNSPDMTracker).ID)));
If(!varNewRecord,Patch(FedSupremacyTracker,LookUp(FedSupremacyTracker,ID=varcurrentrecordID),
{Phase:'Group DropDown_1'.Selected.Value,
Health_x0020_Care_x0020_Specialt:'Occupation Dropdown_1'.Selected.Occupation,
Title:'RPO DropDown_1'.Selected.Title,
OData__x0031_0BRAPPOC:
{'@data.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|"&varCurrentUser.Email,
Department: "",
DisplayName:Office365Users.UserProfileV2(varCurrentUser.Email).displayName,
Email:varCurrentUser.Email,
JobTitle: "",
Picture: ""},
RPO_x0020_POC:{
'@data.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:'NSP Lead ComboBox_1'.Selected.Claims,
Department: "",
DisplayName:'NSP Lead ComboBox_1'.Selected.DisplayName,
Email:'NSP Lead ComboBox_1'.Selected.Email,
JobTitle: "",
Picture: ""},
AUSH:Concat('AUSH ComboBox_1'.SelectedItems,Title,", "),
State_x0020_Variance:'State Variance Toggle_1'.Value,
PreemptingStateRequirements:InvokingSupToggle_1.Value,
Certifications_x0020__x002f__x00: Concat('cert / registration combo box'.SelectedItems,Value,", "),
Federal_x0020_Exemption_x0020_Cl:Concat('Federal Exemption combo box'.SelectedItems,'States and Territories',", "),
Initial_x0020_10BRAP_x002d_RPO_x:'Workgroup Date_1'.SelectedDate,
Workgroup_x0020_Distribution_x00:'Workgroup Email address text'.Text,
NSP_x0020_Workgroup_x0020_Milest:'Current milestone radio_1'.Selected.Value,
CurrentStatus1:{Value:
'current status of milestone - main page - radio_1'.Selected.Value},
NSP_x0020_Workgroup_x0020_Milest0:'Workgroup Milestone completion date'.SelectedDate,
Employment_x0020_Type:'Emp Type Dropdown_1'.Selected.Value,
Occupation_x0020_Code:'Occ Code Text_1'.Text,
Occupation_x0020_Sub_x002d_Code:'Occ Sub-Code Text_1'.Text,
OData__x0023__x0020_of_x0020_Employees:'# of EEs Text_1'.Text,
Nation_x0020_Unions:Concat('National Union Comb bo_1'.SelectedItems,Value,", "),
Non_x002d_National_x0020__x002f_:Concat('Non national combo box_1'.SelectedItems,Value,", "),
Initial_x0020_10BRAP_x002d_RPO_x0:'weekly running notes rich text'.HtmlText}));