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

Community site session details

Session Id : KQEXakZcBuJlFINg6ECfap
Power Apps - Building Power Apps
Answered

How to Query what display mode a field is in

Like (0) ShareShare
ReportReport
Posted on 14 Aug 2022 21:01:09 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
    150,995 Most Valuable Professional on 14 Aug 2022 at 21:06:36
    Re: How to Query what display mode a field is in

    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 14 Aug 2022 at 21:22:39
    Re: How to Query what display mode a field is in

    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 14 Aug 2022 at 21:25:54
    Re: How to Query what display mode a field is in

    Hi,

    Assuming you are checking display mode of a field named TextInput1

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

     

  • cammc Profile Picture
    40 on 14 Aug 2022 at 21:40:44
    Re: How to Query what display mode a field is in

    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
    150,995 Most Valuable Professional on 14 Aug 2022 at 22:53:14
    Re: How to Query what display mode a field is in

    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 15 Aug 2022 at 19:28:36
    Re: How to Query what display mode a field is in

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

  • WarrenBelz Profile Picture
    150,995 Most Valuable Professional on 15 Aug 2022 at 21:11:24
    Re: How to Query what display mode a field is in

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 752 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 472

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 358 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete