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 / For all formula error
Power Apps
Answered

For all formula error

(0) ShareShare
ReportReport
Posted on by

Hello, i have a power app that has been working well but all of a sudden it has brought some errors that i cant seem to wrap my head around, maybe i can get some assistance here!

 

The error happens when i click on a button that is supposed to patch a share point list.

Below are the errors

 

Thank you in advance1.PNG2.PNG

Categories:
I have the same question (0)
  • subsguts Profile Picture
    1,259 Moderator on at

    I think this community can better help you if you provide the following:

    What are the columns and the column types of your data source "TimeSheetDetails"?

    Is the error message you state the one you get when you hover over the Lookup Statement, or do you get a different error message when you hover your mouse over it then please provide that too.

    I believe that your Lookup is not working correctly.  In order to determine why you should break it out into the pieces and make sure each part of it is working and the data you are using in it contains the information you think it does.

     

    If you provide the above and any additional information, I'm sure someone can assist.

     

    Thanks

  • TYNAI Profile Picture
    on at

    Hello @subsguts ,

    Thank you for these clarifications for your questions.

    Is the error message you state the one you get when you hover over the Lookup Statement- Yes, i have attached the same.

    The strange thing is that if i change anything on the code, the error disappears but when the code is run again the error reappers3.PNG4.PNG

     

  • subsguts Profile Picture
    1,259 Moderator on at

    The only reason I imagine that is the case and based on the error, is that one of the things you are passing into the Lookup is not set correctly at the time it runs.  So, syntactically it is correct, but when it runs you are feeding it data it cannot execute the Lookup with.  You need to display before this Lookup runs in labels on the screen what is in each of those fields that make it up.  By knowing this you can break the Lookup part of the statement out and test it separately in a button and even hardcoding the values to see if you can get more information on why the values you are passing are not enabling the query to work.  

     

    I hope this helps.

  • TYNAI Profile Picture
    on at

    Hello @subsguts . 

     

    Thank you for your reply the one thing that i can point out that has changed in my app but i dont know why is how my dates have been showing when i use the "DateValue" formula. Intially when creating the app when i used the datevalue formulaa like this DateValue(lblSelectedDate.Text)    the date will show as 10/24/2022 but the error i am receving started shwowing uo when the same formula DateValue(lblSelectedDate.Text) is now showing 10/24/2022 12:00AM, i am not sure why the Time has started shwoing up, maybe this is what is causing the error

    7.PNG8.PNG

  • Verified answer
    subsguts Profile Picture
    1,259 Moderator on at

    Not I would hope that would be the cause, but you can try hardcoding a date in to see.

     

    Or use this to eliminate the time doing the following:

    Text(lblSelectedDate.Text,ShortDate)

    The best way I know to solve this problem is to try and run the statement in a button, where you can force explicit hardcoded values in it so you can see if you can get it to work through process of elimination.  At least that's how I do it 🙂

    Hope this helps

  • TYNAI Profile Picture
    on at

    Hello @subsguts , thank you for your assistance on this, I think this formal will work Text(lblSelectedDate.Text,ShortDate) but I am yet to try it since I see the app has gone back to displaying the date as it should be. if it reverts to the the other format i will use the solutions you have suggested. 

     

    Thank you so much for your assistance

     

    Kind regards

  • TYNAI Profile Picture
    on at

    @subsguts  maybe a follow up to this, i have noticed the displayed time 10/24/2022 12:00 AM only comes when i do an arithmetic subtraction of days from the formula DateValue(lblSelectedDate.Text) i.e i want to subtract 6 days from this hence the formula will read DateValue(lblSelectedDate.Text) -6, when the 6 is added the this is when the output adds the unwanted 12:00 AM in there, this was not there in the beginning when the app was working fine. Maybe you can have an idea whats going on

  • Verified answer
    subsguts Profile Picture
    1,259 Moderator on at

    @TYNAI , yes, I tested this out and that is indeed the case.

     

    Here's my labels:

    subsguts_0-1667228738083.png

    The first one is hardcoded as "11/01/2006"

     

    The second one: "DateValue(Label6) -6"

     

    The third one: Text(DateValue(Label6) -6,ShortDate)

     

    So, I think it's a "feature" 🙂 of doing math on a date, which has to be taken into account.

     

    Good catch!

  • TYNAI Profile Picture
    on at

    @subsguts This is Amazing and very helpful, seems like a "feature" by all intentions.

     

    We learn a new thing every day, Text(DateValue(Label6) -6,ShortDate) this is good and has solved my problem. Thank you for taking your time with this, I am indebted.

     

    Kind regards

  • TYNAI Profile Picture
    on at

    Hello @subsguts , i have another follow up question on this topic of short dates, how would you implement the short date on this kind of formula,

    Text(varToday+7 - Weekday(varToday,Monday),"dddd, ") & varToday+7 - Weekday(varToday,Monday)+7

     

    Whereby "varToday" is a variable set for "Set(varToday,Today())" , i am getting the same outcome as before whereby the date comes with time e.g 11/11/2022 12:00 AM, i would like to remove the 12:00 AM from the output using the same short date formula 

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 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard