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 / Vacation Selection Pro...
Power Apps
Answered

Vacation Selection Program Code Problem

(0) ShareShare
ReportReport
Posted on by 36

This code is  not working but I can't understand the reason. 😕
This is basically Vacation Program. 
What is the problem of this code? 

ForAll(
 Gunler;
 If(
 Text(Value) <> "1.01.2001";
 Patch(
 PSY;
 Defaults(PSY);
 {
 KiÅŸiler: Text(User().FullName);
 Başlık: "İzinli";
 Proje_Saati: "9";
 Tarih: Value;
 Faaliyet: "İzin";
 Lokasyon: "Ev"
 }
 )
 )
)

 

 

&
Navigate(AnaEkran) &
Reset(TarihSeçimi_1) &
Reset(TarihSeçimi_2) &
Set(Gorunurler; 0)


 

Categories:
I have the same question (0)
  • v-hanytian-msft Profile Picture
    Microsoft Employee on at

    Hi @tguckiran ï¼Œ

     

    It seems that Patch() is Right.

     

    I consider Text(Value) <> "1.01.2001" is wrong.

    May I ask what is the "Gunler" in your formula?

     

    Best Regards,
    Tina

     

  • tguckiran Profile Picture
    36 on at

    It is the Turkish word which means "days". 

  • v-hanytian-msft Profile Picture
    Microsoft Employee on at

    Hi @tguckiran ,

     

     May I ask what's in this table, and what are the field types?

     

    Best Regards,
    Tina

  • tguckiran Profile Picture
    36 on at
    Set(Gunler; ForAll(Sequence(TarihGorevBaslangic-TarihIzinBaslangic); If(Weekday(TarihIzinBaslangic + Value - 1) in [2; 3; 4; 5; 6]; TarihIzinBaslangic + Value - 1; "-1")))

     

    I will share code for "Gunler",

  • Verified answer
    v-hanytian-msft Profile Picture
    Microsoft Employee on at

    Hi @tguckiran ,

     

    According to your formula, we made a sample for you.

    You can double Click "ForAll" and to see what data in the "Gunler" .

    vhanytianmsft_0-1694064750661.png

     

    Take the data I'm currently showing as an example, please try this:

    ForAll(
     Gunler;
     If(
     Text(Value) <> "1/1/2001, 12:00:00 AM";
     Patch(
     PSY;
     Defaults(PSY);
     {
     KiÅŸiler: Text(User().FullName);
     Başlık: "İzinli";
     Proje_Saati: "9";
     Tarih: Value;
     Faaliyet: "İzin";
     Lokasyon: "Ev"
     }
     )
     )
    )
    
     
    
     
    
    &
    Navigate(AnaEkran) &
    Reset(TarihSeçimi_1) &
    Reset(TarihSeçimi_2) &
    Set(Gorunurler; 0)


    Hope this will help you,

    Best Regards,
    Tina

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard