Skip to main content

Notifications

Community site session details

Community site session details

Session Id : OxrnVf7AR/qqnxIwhG6qpq
Power Apps - Error Handling
Unanswered

Modern Text Input - New trigger output property introduces unexpected behavior

Like (3) ShareShare
ReportReport
Posted on 4 Jul 2024 19:56:03 by 108

Hello!

 

Yesterday the new 'Trigger output' property appeared for the first time in the modern Text Input control.

 

Since then, one of my applications does not work correctly. After several tests, I have found out that it is because the new property introduces at least 2 errors:

 

1) There is a certain delay even if the property is 'Key Press'. Therefore, if immediately after filling in the TextInput we press a button that takes the value of the TextInput, the saved value is not complete. This delay can be verified by replicating the attached capture.

 

2) If the property is 'FocusOut' and after writing you press a button, the focus change is not detected. Therefore, if the button takes the value of the textinput to save it, it saves it blank.

 

These errors cause a critical failure in any application that stores the value of a modern text input. In classic control there is no delay.

 

Please, an urgent solution!

Categories:
  • JimmyW Profile Picture
    2,563 on 01 Aug 2024 at 06:17:18
    Modern Text Input - New trigger output property introduces unexpected behavior
    This is still a issue here.
    If you have a button with a If or Switch code on it, this will cause issues and patch will not always work, it does not fail, but it actually wont patch anything.

    I can add that if you use containers where you have the input field in one container and a submit button in another container, you will expireince more issues also.
     
    Example on my Submit button.
    If i select anything else then Focus Out, then i wont be able to submit anything.
    When Focus Out is selected it works most of the time, but many times i will his submit, it will act like a patch have been successful, and close the ticket, but it will actually not patch the change and leave the text in the TextInputTicket.Value.
     
    This have been working perfectly before, until i re-saved the app and the introduction of the Trigger Output was applied.
     
    // Define user details and timestamp once
    Set(
        currentUser,
        {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Department: "",
            DisplayName: User().FullName,
            Claims: "i:0#.f|membership|" & Lower(User().Email),
            Email: User().Email,
            JobTitle: "",
            Picture: ""
        }
    );
    
    Set(
        timestamp,
        "<b>" & Char(10) & User().FullName & "</b>" & "<br> <span style='font-size:10.5pt'>" & Text(Now(), "[$-en-US]yyyy/mm/dd hh:mm") & "</span> <br> "
    );
    
    // Handle Patch Operations
    If(
        !IsBlank(TextInputTicket.Value),
        Switch(
            TabListMenu.Selected.Value,
            "Message",
            Patch(
                Helpdesk,
                CurrentItem,
                {
                    'Case Comments': timestamp & TextInputTicket.Value & CurrentItem.'Case Comments',
                    LastComment: TextInputTicket.Value,
                    'Last Modified By': currentUser,
                    'Last Comment Made By': currentUser
                }
            ),
            "Worklog",
            Patch(
                Helpdesk,
                CurrentItem,
                {
                    Worklog: timestamp & TextInputTicket.Value & CurrentItem.Worklog,
                    'Last Modified By': currentUser
                }
            ),
            "Close",
            Patch(
                Helpdesk,
                CurrentItem,
                {
                    Resolution: timestamp & TextInputTicket.Value & CurrentItem.Resolution,
                    'Last Modified By': currentUser,
                    Status: {
                        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id: 4,
                        Value: "Closed"
                    },
                    'Assigned To': currentUser
                }
            )
        );
    
        // Handle Errors and Reset
        If(
            !IsEmpty(Errors(Helpdesk)),
            Notify(First(Errors(Helpdesk)).Message, NotificationType.Error),
            UpdateContext({ CurrentItem: LookUp(Helpdesk, ID = CurrentItem.ID) });
            Reset(TextInputTicket)
        )
    );
    
    // Handle Ticket Filtering based on Tab Selection
    If(
        TabListMenu.Selected.Value = "Close",
        Switch(
            TabList1.Selected.Value,
            "Unassigned",
            ClearCollect(TicketsCollection, Filter(Helpdesk, Status.Value = "Unassigned")),
            "My Tickets",
            ClearCollect(
                TicketsCollection,
                Filter(
                    Helpdesk,
                    ('Assigned To'.DisplayName = User().FullName) && (Status.Value in ["Assigned", "In Progress", "Waiting for user response", "Waiting for external resource", "Backlog"])
                )
            ),
            "Closed",
            ClearCollect(
                TicketsCollection,
                Filter(
                    Sort(Helpdesk, ID, SortOrder.Descending),
                    'Assigned To'.DisplayName = User().FullName && Status.Value = "Closed"
                )
            );
            Notify("Ticket was closed and placed under Closed tickets.", NotificationType.Success, 600),
            "All",
            ClearCollect(TicketsCollection, SortByColumns(Helpdesk, "CreatedDate", SortOrder.Descending))
        );
        UpdateContext({ itemSelected: false })
    )
     
  • JimmyW Profile Picture
    2,563 on 31 Jul 2024 at 09:15:13
    Modern Text Input - New trigger output property introduces unexpected behavior
    Hi, Jacob
     
    My only issue with this currenlty is that: Focus out is the only one working for my patch, selecting anything else and the user can't press the button, and now the user experience due to Focus out, the user needs to press the button twice, once to focus out from the text input modern control, and a second one to actually press the button.
     
    So currently this is a bad user experience at least from my point of view and for some reason when i select Delay or Key press, im unable press the button at all.
  • Suggested answer
    CU12082001-0 Profile Picture
    on 30 Jul 2024 at 18:43:05
    Modern Text Input - New trigger output property introduces unexpected behavior
    Jimmy,
     
    Since I last replied to this, I can now see a dropdown for 'Trigger Output' in the properties pane of the modern text input control:
     
     
    I'm not sure "FocusIn" is a legitimate value as the official documentation still hasn't been updated by Microsoft. However, the other two options should work for you. 'Delayed' waits for a second after you stop typing to update the context. 'Key press' updates the context every time you press a key. If you have something like a filter based on the text input, you might want to opt for Delayed as updating for every keystroke has the potential to slow things down.

    Also, as a quick test, this is what populates in the formula bar for a text input field named "TextInputCanvas" with a trigger output property set to 'Key press': 
    'TextInputCanvas.TriggerOutput'.Keypress
  • JimmyW Profile Picture
    2,563 on 29 Jul 2024 at 12:25:47
    Modern Text Input - New trigger output property introduces unexpected behavior
    Also having this issue, im unable to set the value to blank or write "FocusIn" if I do im unable to save anything.
  • CU12082001-0 Profile Picture
    on 12 Jul 2024 at 13:26:42
    Re: Modern Text Input - New trigger output property introduces unexpected behavior

    I was going crazy the past couple of days trying to figure out what changed! When editing forms and submitting them, sometimes the last field to be edited would not be saved. Galleries filtered by text input would not filter in real time as text was typed. I did not notice the same behavior with classic controls and was about to convert the whole project to them.

    Thank you so much!

  • CMOLINAV Profile Picture
    108 on 09 Jul 2024 at 17:05:02
    Re: Modern Text Input - New trigger output property introduces unexpected behavior

    According to https://learn.microsoft.com/en-us/power-platform/released-versions/powerapps-studio-players/3.24064 

     

    "For Modern Text Input control, a property called TriggerOutput is replacing old property called DelayOutput. The default value is set to "Focus out" for best performance. This will impact current implementations when opened in studio."

     

    So DelayOutput is replaced.

     

    Setting Blank Trigger output also fix the issue according to my tests.

     

    The first point I mentioned "1) There is a certain delay even if the property is 'Key Press'." I think it's solved, now there's no delay.

     

     

     

     

  • ellewong Profile Picture
    4 on 09 Jul 2024 at 16:08:07
    Re: Modern Text Input - New trigger output property introduces unexpected behavior

    Hi there, I also have this issue. There used to be a different property for delaying output. Now you have to click off of the modern text input control in order to get the value of the text input. 

    Setting the Trigger Output property to "FocusIn" fixed the problem for me.

    ellewong_0-1720541709498.png


    I took a guess at what values would be accepted since the MS documentation for Modern UI  still has...

    DelayOutput - When set to true, user input is registered after half a second delay. Useful for delaying expensive operations until user completes inputting text such as for filtering when input is used in other formulas.

    Please let me know if this fixed your issue. 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Error Handling

#1
stampcoin Profile Picture

stampcoin 10

#2
danielleh Profile Picture

danielleh 2

#2
WarrenBelz Profile Picture

WarrenBelz 2 Most Valuable Professional

Overall leaderboard

Featured topics