cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hemasai1999
Helper II
Helper II

How to use lookup function for ForAll function

Hi,

I am new to this app and recently I started creating on app where I have on gallery in that gallery I have to fetch the dates which are selected in datepicker1(start date ) and datepicker2(end date)

ClearCollect(
DateRange,
AddColumns(
FirstN(
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],
DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate, Days) + 1),
"Day",
"Day " & (Value + 1),
"Date",
DateAdd(DatePicker1.SelectedDate, Value, Days),
"Date Name",
Text(DateAdd(DatePicker1.SelectedDate, Value, Days),"ddd")
)
);

I wrote this formula in eye icon to display items in gallery .

Screenshot (57).png

 

In check Icon I need to write patch function to store in list 

ForAll(
Filter(
Gallery7_4.AllItems,
Checkbox4_1.Value
) As aPatch,
Patch(
Dates,
Defaults(Dates),
{Title:aPatch.Date,
reqID:TextInput2.Text,
'Start time':Label10_8.Text,
'End Time': Label10_9.Text
}
)
);
So, I have written this formula but problem I am facing is when I want to update start time for one particular date then it is creating duplicate values instead of overriding existing values since I have not used look up function, But when I use Lookup function in forall then It is throwing me error.
Please Help in this regard.
0 REPLIES 0

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,990)