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

Community site session details

Session Id : TdSx215ww+2parJOPgRPt5
Power Apps - Building Power Apps
Unanswered

Patch, Week Number,Month Name

Like (0) ShareShare
ReportReport
Posted on 16 Jul 2020 16:38:26 by 709

Hi Team,

 

I am struggling with Patch and Couple of Formula. 

The formula I need is WeekNumber and Month Name for which I have DatePicker Name as PKTDate as Reference.

Month Name is a TextInput Called TextInputMonth

WeekNumber as TextInputWeekNumber

These Two Inputs need to auto Populated, the moment user select Date from DatePicker.

 

I have 6 fields that are not a part of the gallery. I want to submit  11 Feild to SharePoint List (ProcessKnowledgeTest)

Out of 6 Fields which I have added 1 DatePicker, 4 InputBox, 1 Dropdown.

 

akbarmahfuzalam_0-1594917473370.png

 

 

  • TJO Profile Picture
    230 on 16 Jul 2020 at 22:10:51
    Re: Patch, Week Number,Month Name

    Im not sure what you want to do;

     

    If it is you want to modify multiple records...UpdateIf()

     

     

  • akbarmahfuzalam Profile Picture
    709 on 16 Jul 2020 at 19:25:28
    Re: Patch, Week Number,Month Name

    Wants to update the entire Gallery

    Whereas, It is updating only one single rows 

     

    Patch(
    ProcessKnowledgeTest,Defaults(ProcessKnowledgeTest),
    {PKTDate:PKTDate.SelectedDate,Week_Number:PKTWeek.Text,Month:PKTMonth.Text,LOB:LineOfBusiness.Text,QueueName:DropdownQueue.Selected.queue_name,SAPID:SAPID.Text,EID:EID.Text,OpportunityEarned:TextInputOpportunityEarned.Text,TotalOpportunity:TextInputTotalOpportunity.Text,UploadedBy:UploadeBY.Text}
    )

     

    What am I missing guys ?

     

    akbarmahfuzalam_0-1594927462326.png

     

  • akbarmahfuzalam Profile Picture
    709 on 16 Jul 2020 at 18:58:42
    Re: Patch, Week Number,Month Name

    Hi TJO,

     

    How about the Patch function. Where am I wrong. Please correct me on the below formula

     

    Patch(
    ProcessKnowledgeTest,
    ProcessKnowledgeTestGallery.Selected,
    {PKTDate:PKTDate.SelectedDate,Week_Number:PKTWeek.Text,Month:PKTMonth.Text,LOB:LineOfBusiness.Text,QueueName:DropdownQueue.Selected.queue_name,SAPID:SAPID.Text,EID:EID.Text,OpportunityEarned:TextInputOpportunityEarned.Text,TotalOpportunity:TextInputTotalOpportunity.Text,UploadedBy:UploadeBY.Text}
    );

     

    akbarmahfuzalam_0-1594925871110.png

     

  • TJO Profile Picture
    230 on 16 Jul 2020 at 18:29:42
    Re: Patch, Week Number,Month Name

    @akbarmahfuzalam: Here's some input that might help; try putting that into the respective 'Text' properties:

    For the Weeknumber (Week starting from Monday) into 'Text' of TextInputWeekNumber:

     

    If(
     RoundDown(
     (PKTDate.SelectedDate - Date(
     Year(PKTDate.SelectedDate),
     1,
     1
     ) + (Weekday(
     Date(
     Year(PKTDate.SelectedDate),
     1,
     1
     ) - 1,
     Monday
     ))) / 7,
     0
     ) = 0,
     52,
     RoundDown(
     (PKTDate.SelectedDate - Date(
     Year(PKTDate.SelectedDate),
     1,
     1
     ) + (Weekday(
     Date(
     Year(PKTDate.SelectedDate),
     1,
     1
     ) - 1,
     Monday
     ))) / 7,
     0
     )
     )
     

     

     

     

     

    And for the month I'm not so sure; maybe something like this (mm for months number, and mmm or mmmm for verbose, not sure which one)

     

    Text(Month(PKTDate.SelectedDate), "[$-de-DE]mm")

     

     

     

     

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete