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 / How to Query what disp...
Power Apps
Unanswered

How to Query what display mode a field is in

(0) ShareShare
ReportReport
Posted on by 40

I'm wanting to query what display mode something is in, in order to trigger off an separate action for an email - the below works perfectly fine - its using a dropdown to say yes or no to trigger it (using it to test the code worked). However I would like to have it check a different field and if that fields display mode is set to edit then trigger.

 

However when I use bt.navsubmitall'.DisplayMode. = edit , it doesn't work, and when I have tried looking up how a query what displaymode a field is in, all I'm getting back is how to set the display mode (which isn't what I need) any help?

If(
 Checksub.Selected.Value = "Yes",
 Office365Outlook.SendEmailV2(
 User().Email,
 "Sales_App_Information_Submitted",
 HtmlTextEmailToSend_1.HtmlText,
 {
 Cc: User().Email,
 Bcc: "xxx@xxx.com",
 Importance: "High"
 }
 ),
 Office365Outlook.SendEmail(
 User().Email,
 "Failed_to_create_Documents",
 HtmlTextEmailToSend_1.HtmlText,
 {
 Cc: "xxx@xxx.com",
 Importance: "Low"
 }
 )
);

  

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @cammc ,

    Are you referring to the DisplayMode of a Form or another control. If so, what type of control and how are you setting the DisplayMode ?

  • cammc Profile Picture
    40 on at

    I have an if statement on a button that determines its display mode, based on other criteria on the app. What I am trying to do is query if that buttons display mode is edit then trigger

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi,

    Assuming you are checking display mode of a field named TextInput1

    If(TextInput1.DisplayMode=DisplayMode.Edit, SubmitForm(Form1))

     

  • cammc Profile Picture
    40 on at

    I tried that initially (minus the submit form as that bit isn't relevant), and added it at the top of my statement in replacement of the checksub value but it still throws and error on the if statement saying if statement has invalid arguments

  • Verified answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @cammc ,

    Just use the same If statement as the button, but instead of setting the DisplayMode, send the appropriate email.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • cammc Profile Picture
    40 on at

    isn't exactly what i was wanting to do, as its code duplication, but it does work

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @cammc ,

    Code duplication (via Ctrl-C / Ctrl-V) is something I am accustomed to . . .

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard