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 Apps
Answered

Auto Calculation

(0) ShareShare
ReportReport
Posted on by Super User 2024 Season 1

I have this formula and is weird is working with some of my apps and other apps  not working please help what is happening and formula its on Number payments OnChange   here is the formula and screenshot 

ForAll(
 FirstN(
 ColNumb1,
 Value(DataCardValue45.Text)
 ),
 Collect(
 NewLoansCollection,
 {
 CItemSerialNumber: Text(Last(NewLoansCollection).CItemSerialNumber + 1),
 LoanDueDate: Switch(
 DataCardValue40.Selected.Value,
 "Weekly",
 DateAdd(
 DataCardValue39.SelectedDate,
 Value(Last(NewLoansCollection).CItemSerialNumber + 0) * 7,
 Days
 ),
 "Daily",
 DateAdd(
 DataCardValue39.SelectedDate,
 Value(Last(NewLoansCollection).CItemSerialNumber + 0),
 Days
 ),
 "Monthly",
 DateAdd(
 DataCardValue39.SelectedDate,
 Value(Last(NewLoansCollection).CItemSerialNumber + 0),
 Months
 ),
 "Annual",
 DateAdd(
 DataCardValue39.SelectedDate,
 Value(Last(NewLoansCollection).CItemSerialNumber + 0),
 Years
 )
 ),
 Clevel: "",
 Ctc: "",
 Cdescription: "",
 'loan amount': Value(TextInput1.Text) / Value(DataCardValue45.Text)
 }
 )
)

 

tempsnip45.pngCapture2.3PNG.PNGtempsnip.png

Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ramole ,

     

    Could you please share more details about the App? What do you mean by "Not working"?

     

    Could not find a problem in your formula, as per you mentioned that some of your apps worked fine, please provide the results or performance of not working.

     

    Best regards,

    Community Support Team _ Jeffer Ni

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @v-jefferni 

    I am not getting error at all 

    Is not creating the collection as it does some of my apps its basically i am calculating  the dates and amount but i think my problem is the generating the row which is this line 

    you can modify if you needed please 

    CItemSerialNumber: Text(Last(NewLoansCollection).CItemSerialNumber + 1)

    Thanks 

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ramole ,

     

    Do you mean that the formula have not been executed by the OnChange action?

     

    As per your description, I don't think the issue comes from that sentence, only if nothing in the "Number payments" text box then it would not create the collection but apparently it is not blank.

     

    Could you please check if the "ColNumb1" collection generated properly in those "not working" apps?

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Yes OnChange not executing, please whats other formula i can use ?

  • Verified answer
    Ramole Profile Picture
    Super User 2024 Season 1 on at

    Solved since 

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
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard