
HI Team,
I am facing a challenge in a task where I am using SharePoint as a data source sharing the snap for better understanding too.
in Galllery using a collection and outside the gallery using add new button which will add the rows in gallery so here when filter is working unable to add row and when rows are adding there is need to get filter as well.
if someone did this kind of work please do let me know.
Note: In gallery needed Filter with add rows:
Gallery Items Using :
colhumanresource (Collection)
Add New onselect using
If(IsBlank(comboProjectID.SelectedItems),Notify("Project ID can not be blank",NotificationType.Error),Collect(colhumanresource,{});)
Submit Button using:
If(IsBlank(drpname.Selected.Value),Notify("Name can not be blank",NotificationType.Error),
If(IsBlank(drpposition.Selected.Value),Notify("Position can not be blank",NotificationType.Error),
ForAll(
glrycrew.AllItems,
Patch(
DPR_Human_Resources,
ThisRecord,
{
'Project Number': comboProjectID.Selected.Value,
Title: drpname.Selected.Value,
Position: drpposition.Selected.Value,
Embarked: embarkdate.SelectedDate,
Disembarked: disembarked.SelectedDate,
Project: projectname.Text,
Client: client.Text,
Asset: asset.Text,
Today_Date:DateValue( Today())
}
)
)
));
Notify("Crew data added successfully",NotificationType.Success,3000);
Navigate(Home_Screen)
Thanks & Regards,
VK@mohit
Hi @Vk_Mohit ,
I so not know which fields are inside the gallery and which are not (other than ProjectID). Assuming you have the record ID in the Gallery Data, remove the _Gal. reference for any item not in the gallery.
If(
IsBlank(drpname.Selected.Value),
Notify(
"Name can not be blank",
NotificationType.Error
),
IsBlank(drpposition.Selected.Value),
Notify(
"Position can not be blank",
NotificationType.Error
),
Patch(
DPR_Human_Resources,
ForAll(
glrycrew.AllItems As _Gal,
{
ID: _Gal.ID,
'Project Number': comboProjectID.Selected.Value,
Title: _Gal.drpname.Selected.Value,
Position: _Gal.drpposition.Selected.Value,
Embarked: _Gal.embarkdate.SelectedDate,
Disembarked: _Gal.disembarked.SelectedDate,
Project: _Gal.projectname.Text,
Client: _Gal.client.Text,
Asset: _Gal.asset.Text,
Today_Date: Today()
}
)
)
);
Notify(
"Crew data added successfully",
NotificationType.Success,
3000
);
Navigate(Home_Screen)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps