web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Galery LookUp for a da...
Power Apps
Unanswered

Galery LookUp for a date field

(0) ShareShare
ReportReport
Posted on by 194

Hello all,

I have a quick question. I am doing a weekly query for the production ratio and I have written the following formula regarding this:

 

If(Startdatum_Kalenderwoche.SelectedDate = Galerie_Zur_Kontroll_Abfrage.Selected.Startdatum; Galerie_Zur_Kontroll_Abfrage.Selected.Schichtanzahl;"")

 

I want if my Start Date field on a new entry has the same start date as a value from my gallery, then it should transfer its number to my Shift Count field.

Categories:
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Ömer ,

     

    Are you trying to sum multiple numbers inside a single field based on a condition (start date = record date)?

     

    If you are, then I suggest a mix-up of "Sum()" and "Filter()".

     

    "Filter()" will give you a list of values corresponding to the condition you established.

     

    "Sum()" will return the sum of a column from a list.

     

    But chances are I misunderstood your issue. If so, could I ask you to elaborate further on your objective please?

  • Ömer Profile Picture
    194 on at

    I don't want to add up anything.

    We can work 3 shifts in one day. The employee from the 1 shift enters 3 shifts for the day and enters all the necessary information for his shift.

    The employee from the second shift should then also enter his information but no longer the number of shifts. Therefore I would like to fill the field from the gallery.

    If there is the day with the number of shifts, then gives the number of shifts accordingly for the field with.

    Hopefully that was more understandable

    Translated with www.DeepL.com/Translator (free version)

  • WiZey Profile Picture
    3,023 Moderator on at

    Basically, from what I understood :

     

    First employee submit data and the program creates three shifts. Only the first shift is edited.

     

    Second employee submit data and the program automatically deduces it has to edit the second shift.

     

    Same for third employee.

     

    Is that correct?

     

    Also, are "shifts" represented as single record in your list or as three separate columns based on the same record?

     

     

  • Ömer Profile Picture
    194 on at

    Exactly every layer becomes a Sharepoint entry. The goal is to end up with the three entries to create a PowerBi report for example. Which contains the total of the day.

    Exactly the first employee puts the shift information for the day which should be filled in by the next employee in advance.

    For the weekly target I have managed with the formula only with the date field I have a problem

    The second employee then enters his information within the shift as for example there was downtime at the machine.

  • WiZey Profile Picture
    3,023 Moderator on at

    Thanks for your answer, I'm starting to get a clearer picture.

     

    It's a bit late of a question, but how do you determine if a record is the second or third shift? Do you use a text-type column or a number-type column to identify a record as the first, second and third shift?

     

    Do you already have a code for creating the records in your list?

  • Ömer Profile Picture
    194 on at

    I have a selection field then with early shift, afternoon shift and late shift. From this you can see which is the second or third shift.

     

    To save the form and generate an entry I use SubmitForm

  • WiZey Profile Picture
    3,023 Moderator on at

    I'm not particularly fond of forms in PowerApps nor am I well versed in their usage, but here is what I can share.

     

    Using a form imply you're able to provide the item from the source you want to edit, which means if you want to edit the second shift you'll have to pick up the record and insert it in the form.

    But, if you also want to provide data from previous shifts, I believe you can modify the "Default" property of the datacard to look for the information the employee from the previous shift entered.

     

    So basically :

    • You provide the form with the next shift (the record you want to edit)
    • You modify the "Default" property of the datacard containing the information the employees can edit, so that it retrieve the information from the previous shift

    You can use a "LookUp()" to retrieve the record of the previous shift, then submitting the form should edit the record of the next shift.

     

    If(User submit first shift,
     //First shift, let employee submit data on his own,
     User submit second shift,
     //Use LookUp() to retrieve first shift's information,
     User submit third shift,
     //Use LookUp() to retrieve second shift's information
    )

     

    I can't offer a code sample as I don't know how your database is structured, but I hope my advice was enough to guide you. I'd be happy to assist if you need further help.

  • Ömer Profile Picture
    194 on at

    I will try with these 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard