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 / On Select - The functi...
Power Apps
Answered

On Select - The function expects an editable form as input

(0) ShareShare
ReportReport
Posted on by 26

I'm trying to apply a formula into the "save" icon, but it keeps showing an error message:

The function expects an editable form as input

This is the formula I'm using:

 

If (
DataCardValue4.Selected.Value = "Saída";
If(
Value(DataCardValue3.Text) > varItem.'Quantidade Estoque';
Notify(
"A quantidade de saída é maior do que a quantidade em estoque";
NotificationType.Error
);
Patch(
'Estoque de Material de Escritório';
LookUp(
'Estoque de Material de Escritório';
Código = varItem.Código
);
{'Quantidade Estoque': varEstoque}
);;
SubmitForm(Form_Criar_Movimentação);;
Navigate(Tela Inicial; ScreenTransition.Cover);;
Notify("Saída registrada com sucesso"; NotificationType.Success)
);
Patch(
'Estoque de Material de Escritório';
LookUp(
'Estoque de Material de Escritório';
Código = varItem.Código
);
{'Quantidade Estoque': varEstoque}
);;
SubmitForm(Form_Criar_Movimentação);;
Navigate('Tela Inicial'; ScreenTransition.Cover);;
Notify("Entrada registrada com sucesso"; NotificationType.Success)
)

Categories:
I have the same question (0)
  • timl Profile Picture
    36,634 Super User 2026 Season 1 on at

    Hi @ginicolini 

    Can  you confirm that Form_Criar_Movimentação is of type "Edit form" rather than "Display form"? If it's a Display Form, this would explain the error that you're seeing. In this instance, you'd need to replace it with an "Edit form".

     

    timl_0-1695305981033.png

     

  • Michael E. Gernaey Profile Picture
    53,932 Moderator on at

    Hi,

     

    Happy to help and thank you so much for posting the code it really help. Just fyi for the future as its hard to read :-). if you can please use the </> (code snippet) in the top right, it helps, especially with so much text and hierarchy hehe.

     

    First question, is the Form_Criar_Movimentação in edit mode or view mode? if its in ViewMode that is why. If not then please move onto the next part.

     

    I see two issues and possible.

     

    1) In your TOP IfValue(Data xxx) where you Navigatej to Tela Incial. It has no ' ' single quotes around it. You need those.

     

    2. I notice that IF the top part is true, you patch, but then you patch again. Do you mean to patch 2 times if the top If executes?

     

    I believe the problem is you are patching twice. I'm guessing thats not intended, and you need to add the bottom patch to the If or other bracket, but not intended to double patch. Please comment out one of the sets of code and try again. If it works fine then you know thats the problem and you just need to fix the double patch as I dont think it will work properly after the first patch.

     

     

    If (DataCardValue4.Selected.Value = "Saída",
     If(Value(DataCardValue3.Text) > varItem.'Quantidade Estoque',
     Notify("A quantidade de saída é maior do que a quantidade em estoque",NotificationType.Error);
     
     Patch('Estoque de Material de Escritório', LookUp('Estoque de Material de Escritório', Código = varItem.Código);
     {
     'Quantidade Estoque': varEstoque}
     )
    
     SubmitForm(Form_Criar_Movimentação);
    
     Navigate(Tela Inicial, ScreenTransition.Cover);
     Notify("Saída registrada com sucesso"; NotificationType.Success)
     );
    
     Patch('Estoque de Material de Escritório', LookUp('Estoque de Material de Escritório', Código = varItem.Código),
     {
     'Quantidade Estoque': varEstoque}
     );
    
     SubmitForm(Form_Criar_Movimentação);
    
     Navigate('Tela Inicial'; ScreenTransition.Cover);
     
     Notify("Entrada registrada com sucesso"; NotificationType.Success);
    )


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

     

     

     

  • ginicolini Profile Picture
    26 on at

    .

  • ginicolini Profile Picture
    26 on at

    Yes, it's already a "Edit form" type

  • Verified answer
    ginicolini Profile Picture
    26 on at

    1) In your TOP IfValue(Data xxx) where you Navigatej to Tela Incial. It has no ' ' single quotes around it. You need those.

    Ok, fixed this item

     

    2. I notice that IF the top part is true, you patch, but then you patch again. Do you mean to patch 2 times if the top If executes?

    I'm patching it twice 'cause one is to register the entry and the other is to check the products out of my stock

     

    The other error message it's fixed, but now the error is "Network error when using the Patch function: "Title" field is required.

  • Verified answer
    timl Profile Picture
    36,634 Super User 2026 Season 1 on at

    @ginicolini - if you're adding a new record through your Form_Criar_Movimentação Form, I'd check that you have card that sets the title field. If this isn't set, it would explain the "title field is required" error.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard