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 / Patch collection calcu...
Power Apps
Unanswered

Patch collection calculated Field

(0) ShareShare
ReportReport
Posted on by

In my gallery for repeating tables, I have a label for a calculated field (I tried a text input but got the same result).  This field calculates the Rate and checks a Yes/No field.  If the Yes/No field is Yes, then the rate is the Rate * .75, othewise it is just the Rate.  When running the app, it works, but when patching to the temporary gallery, the field show 0 when looking at the collections.

 

The formula in the OnSelect is:

 

Patch(
RequestCollection,
ThisItem,
{
PerDiemDate: dtePerDiemDate.SelectedDate,
Location: txtLocation.Text,
PerDiemRate: Value(txtPerDiemRate.Text),
JobName: drpJobName.Selected.Value,
Notes: txtNotes.Text,
TravelDay: drpTravelDay.Selected.Value,
Reimbursement: Value(lblReimbursementCalculated.Text),
CompanyHousing: drpCompanyHousing.Selected.Value,
CompanyCar: drpCompanyCar.Selected.Value
}
);

Categories:
I have the same question (0)
  • Geeks_D Profile Picture
    1,169 on at

    For the Calculated field when yes use  - Value((Rate) * 75)  

  • Will30 Profile Picture
    on at

    Sorry, I am still new to this.  The current formula is:

     

    If(
    Value(ThisItem.PerDiemRate) <> 0 && ThisItem.TravelDay="Yes",
    Value(ThisItem.PerDiemRate) * .75,
    Value(ThisItem.PerDiemRate)
    )

     

    Plus in the entry row the calculation does not show up until the Save button is selected.  But again, it does not show up in the collection view.

  • Geeks_D Profile Picture
    1,169 on at

    Try this 
    If(

    (Value(ThisItem.PerDiemRate) <> 0 && ThisItem.Selected.TravelDay.="Yes"),
    Value(ThisItem.PerDiemRate) * 0.75,
    Value(ThisItem.PerDiemRate)
    )

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Geeks_D ,

     

    Few doubts:

    1. Have you added the label in your gallery to store value and its not stored in your datasource, correct?

    If yes, then you need to add the label column using 'AddColumns' so the value will be inserted in your collection. 

     

    2. When you say calculated, its your custom calculation, right. If its the calculated type (considering dataverse) it calculates automatically when content is saved.

     

    Hope this helps

  • Will30 Profile Picture
    on at

    Did not work.  Same Result

  • Geeks_D Profile Picture
    1,169 on at

    I assumed the label is already in the gallery which checks each item for the checkbox value to perform the cal

  • Will30 Profile Picture
    on at

    I posted this.  I think this would fix the issue but not sure how to do it:

    Update a colum based on another column 

    What do you think?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard