Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Unanswered

User Defined Functions : Play issue

(0) ShareShare
ReportReport
Posted on by 2

Hello,

 

I have written a function in App.Formulas that works correctly in the edit mode of the app.
However, I noticed that since I enabled "User-Defined Functions" in the settings, the application publishing does not update correctly in play mode.
When I launch the application in play mode, it indicates that there is an update:

"A new version of this app is coming. We'll let you know when it's available."

But it never actually updates.

 

The issue is resolved when I disable this feature.

Do you know any solutions to resolve these issues?

 

Thank you!

Categories:
  • QiangShao Profile Picture
    23 on at
    Re: User Defined Functions : Play issue

    Yes, I made a copy of the app and just keep it aside with no changes.

  • RickNguyen Profile Picture
    Microsoft Employee on at
    Re: User Defined Functions : Play issue

    Hi @QiangShao ,

     

    I've looked in our logs with the session ID provided and wasn't able to find anything out of the ordinary. Do you have a consistent repro for issue #6?

  • QiangShao Profile Picture
    23 on at
    Re: User Defined Functions : Play issue

    I tried to delete all the screens except the start one. Seems the issue is gone. Have you find anything from the session ID I provided?

  • RickNguyen Profile Picture
    Microsoft Employee on at
    Re: User Defined Functions : Play issue

    Hi @QiangShao , would you be able to provide us with a minimal repro msapp to avoid any IP concerns? I tried following the details you provided and have not been able to reproduce the issue. I can update in Play mode.

  • QiangShao Profile Picture
    23 on at
    Re: User Defined Functions : Play issue

    - Session Id where you see #6 issue.

       83ef19c0-edd8-4dfc-853c-883bc1545ba1

    - Session Id for #3 and App Id for the app.

       Session Id:35b03f94-25cb-4048-879b-9bd0bfcddae2

       App Id: 5f9643ff-36a8-41f6-a370-3961c16b5afe 

    - It would help if you can share your msapp to investigate #5 and #6.

       Sorry, my bose has some IP concerns about this

     

    Here is the formular I used

     

    NumberofCalVersion(Input:Text):Number=LookUp(cltAlphabet,Value = Mid(Input,9,1),ASC)*26+LookUp(cltAlphabet,Value 

     

    And how i achieve collection cltAlphabet

     

    ClearCollect(
     cltAlphabet,
     ForAll(
     Sequence(
     26,
     65
     ),
     {
     Value: Char(Value),
     ASC: Value
     }
     )
    );

     

     i will call the function like this, 

     

    NumberofCalVersion("AB11111.XY")

     

     the return would be a number of 

     

    ascii value of "X" *26 +acsii value of "Y"

     

  • ShantanuP Profile Picture
    on at
    Re: User Defined Functions : Play issue

    Hi @QiangShao,

       Thanks for reporting the issue. I am unable to repro this issue on my end. Is it possible for you to share following information?

    - Session Id where you see #6 issue.

    - Session Id for #3 and App Id for the app.

    - It would help if you can share your msapp to investigate #5 and #6.

  • QiangShao Profile Picture
    23 on at
    Re: User Defined Functions : Play issue

    Hi, Shantanu

     

    Do you have any findings about this issue? i've experiencing similar issue recently.  Here are my observations,

    1. There is no "Publish this version" option under the more commands button in the Details -Versions tab. Only way to publish the latest version in the Edit mode. Save and Publish.
    2. After publish, play mode keep saying "A new version of this app is coming. We'll let you know when it's available" for a very long time. which normally only take a few seconds or minutes. This is with the browser ever opened this app
    3. App can not be loaded if the browser cache is cleared or open with Inprivate window3.png

    4. Published column of the latest version in the Details -Versions tab shows  "Live" as normal, but there is another version shows "Test"4.png
    5. Firstly i disable the UDFs in App.formular, issue disappeared. But it happened again today, i don't know why, just disable the UDFs along with New analysis engine feature.
    6. Sometimes, when i first enter into the edit mode, error occurs agaist the user defined function, the strange thing is that while I comment out the code and then undo it, the error disappear. But will appear if I reload to edit.6.png

    7. Powerapps release is: 3.24023.14 and 3.24024.12
  • ShantanuP Profile Picture
    on at
    Re: User Defined Functions : Play issue

    @PeterCBell_au ,

    I created an app from scratch.

    Added a button and OnSelect action to create collection.

    Created UDF with same expression that you provided above.

    I published the app and I was able to reopen it. 

     

    I didn't run into any issue. Do you have any more steps when you repro the issue above? If yes then can you please share it? If you have msapp with repro then you can share it with me with private message as well. Thanks!

  • d2034 Profile Picture
    49 on at
    Re: User Defined Functions : Play issue

    Hi all, I have a similar issue when using UDF, but for me, UDF change the height of some controls in custom components in my app.  It's like the "Flexible height" is activated, but, in the Studio, "Flexible height" is disabled and I use a static value for the Height.  

     

    Example:  My container "conLayout" is set with Height 40, Max-Height 40 and Flexible height is false.

    In the Studio, I see the container correctly.  Once published, the height is not 40, and, looking at the html source, I see the style property of the div is set to 200px.

     

    Maybe it is related, because it's an issue in a Published App, using UDF.

     

    EDIT: It may be related to this post: https://powerusers.microsoft.com/t5/Power-Apps-Experimental-Features/New-Analysis-Engine/td-p/2491421/jump-to/first-unread-message

  • PeterCBell_au Profile Picture
    105 on at
    Re: User Defined Functions : Play issue
    udfMeetingBaseColour(UnitName: Text,isImportant:Boolean) :Color=If(isImportant,Color.Yellow, If(  IsBlank(First(Filter(UnitColours,ColUnit=UnitName))),Color.NavajoWhite,  First(Filter(UnitColours,ColUnit=UnitName)).fCol ))
     
    The UDF is using a collection 'UnitColours' to perform the calculation. Is this the problem?
     
    The collection has some logic to create the collection from a text string stored in a sharepoint table. I doubt that matters, just create a collection with the same record structure to test it at your end.
    ClearCollect(UnitColours,{ColUnit:"",fCol:Color.Black});Clear(UnitColours);
    //Extract the key:colour values
    ForAll( ForAll(Split(gblMeetingColours,VertBar), {Result: ThisRecord.Value}),
    If(!IsBlank(TrimEnds(Result)),
        Collect(UnitColours,
        {ColUnit:TrimEnds(First(ForAll(Split(Result,","), {Result: ThisRecord.Value})).Result) , fCol:ColorValue(TrimEnds(Last(ForAll(Split(Result,","), {Result: ThisRecord.Value})).Result))}
        )
        )
    );

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics