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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / 'l Is not a function'
Power Apps
Answered

'l Is not a function'

(3) ShareShare
ReportReport
Posted on by 12
I have used the Inspection App template on Power apps, and have done a couple of my own edits, such as inserting my companies colour scheme. But for some reason, I keep getting a little warning coming up: "l is not a function", whenever I open up any of my screens, apart from my first 2. And once the warning comes up once, it won't pop up again until you reload the app. 
To try and explain myself clearly:
You open the app on the landing screen, no alert. 
The app then takes you to the Welcome screen, no alert. 
You then click 'Perform 'inspection' and the alert comes up. 
Additionally, when I am editting the app, even if I bypass the 'Items Screen' (AKA, bypass 'Perform inspection'), and I open the 'Forms screen' or 'Confirmation screen', or any other screen than my first 2, I will still get the pop up. I have absolutely no idea why is it coming up. The app checker isn't helping, chat GTP isn't helping, and I can't find any function that might be causing an issue...

Please see images for what the error looks like. 
 
P.S, I am also getting the same error on my Manage Inspections' app template too. 
This image is from my 'Items Screen' after clicking 'Perform Inspection':
This image is from my 'Overview Screen'; bypassing the Items Screen in power-apps developer.  

If I were to open any screen again, I would no longer get the pop-up.
Categories:
I have the same question (0)
  • jrletner Profile Picture
    720 Super User 2025 Season 2 on at
    It sounds like there is something inside that screen's onVisible property?
     
    Click on the screen, then on the property menu dropdown click on the OnVisible property. Unless you are expecting soemthing to be there, it should be empty in the forumula bar.
     
  • calebH Profile Picture
    12 on at
    @jrletner Hi, 
    On the Inspection template app, there stuff inside the OnVisible property of every screen, and often it's  manipulating collections and variables etc. 
     
    Here is the OnVisible code of my 'Items Screen':
    //navigation variable to control whether the user should be navigated to the forms screen or directly to the checklist overview screen
    Set(
        gblSkipFormNav,
        false
    );
    //variable to store number of checklist steps in the selected form
    Set(
        gblFormStepsCount,
        0
    );
    //variable to display warning if the number of checklist steps in the selected form is zero
    Set(
        gblDisplayNoStepWarning,
        false
    );
    //collection to store checklist steps
    //Clear(colLastInspectionSteps);

    Here is the code from the OnVisible of my Forms screen:
    Set(
        gblLocationType,
        galAreas.Selected.'Location Type'
    );
    ClearCollect(
        colForms,
        LookUp(
            'Area Inspection Location Types',
            'Area Inspection Location Type' = galAreas.Selected.'Location Type'.'Area Inspection Location Type'
        ).'Area Inspection Checklists'
    )

    What doesn't make sense to me is that the warning appears on everyscreen apart from my first two, but only ever on the first time of openning a screen. It doesn't appear seperately on every screen, it only ever appears once, one any of the screens but my first two. Does that make sense?
  • Suggested answer
    jrletner Profile Picture
    720 Super User 2025 Season 2 on at
    Another thing you can try is using the built-in activity monitor. In the upper right-hand corner, click on the app checker icon:
     
     
    Thank click on the open monitor link at the bottom of the popup that appears:
     
     
    In a new tab or window, the monitor will load. Put your app in play mode and when the error message appears, you should be able to see that in the monitor.
     
     
    When your error appears, you should be able to find that activity in the monitor list. It will give you information here about where that error generated.
     
    This may help you narrow down the source of your issue.
  • calebH Profile Picture
    12 on at
    Hi, 
    Thanks again for your response the time you've put into this issue. 
    Because it is an app template, it appears that some editting permissions are restricted so I can't actually see 'Open Monitor' link... and the App check does not pick up my issue. 
    Is there another way I can monitor my app? 
    Honestly, I have spent a lot of time trying to figure out why this issue keeps popping up... I have absolutely no idea. All of my own custom code is absolutely fine as far as I can see; if it weren't the app checker to alert me of it. 
     
     
    Once again, thank you for your time. 
  • Verified answer
    jrletner Profile Picture
    720 Super User 2025 Season 2 on at
    You could put something like this in your App OnError property to log any errors. After the error occurs, you could view this information inside the object it saves in varMyErrorLog
     
    Set(varMyErrorLog,FirstError);
  • calebH Profile Picture
    12 on at
    Thanks!
    This what I have got, just need to figure out what's going on wrong now! Thanks for your help!
  • jrletner Profile Picture
    720 Super User 2025 Season 2 on at
    Fantastic, now you know to go to the items property of that gallery and find out what "I" is doing....woohoo!
  • MM-16101356-0 Profile Picture
    17 on at
    Ok, I've run into this on two separate pages, and both times it was
    • occuring in a nested gallery (a gallery within a gallery),
    • using a 1:N or N:N relationship, and
    • happening when accessing the data directly from Dataverse.
    When I switched to using collections instead of populating the gallery directly with Dataverse data, the error was resolved. It took some effort, but now at least my users aren't freaking out about this.
     
    My unfounded assumption is that some update with the new analysis engine is causing this to freak out, as the custom pages I got the error on were fine until mid-February, similar to you. Changing the "Record scope one-to-many and many-to-many relationships" settings also did not fix this.
     
    Hope this helps!
  • KingFlippyNips Profile Picture
    17 on at
    I have the exact same problem except mine is using a named formula created from a Dataverse table also using one to many in a nested gallery. I changed to using a collection and it's still there. I changed to access Dataverse direct...same problem.
     
     
    Update...I just fixed mine by using Filter instead of dotting into the records I needed using ThisItem: (
    Filter(fxPrograms,Customer.Customers = ThisItem.Customers) instead of ThisItem.Programs). 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard