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 / Set "Display mode" of ...
Power Apps
Answered

Set "Display mode" of combo box on form to "View" is LastSubmit not empty.

(0) ShareShare
ReportReport
Posted on by 225

I have a form (see attached) that allows users to submit visitor details and then displays the result in a gallery below.  The user can submit multiple visitors, but the "host" and "Visiting Site" fields will always be the same as the first form submitted.   I have this part working with a "LastSubmit.host", etc. formula, which when the form is submitted, it pre-populates the "Host" & "Visiting Site" fields, leaving the remaining fields empty. This works fine, but it would be nice for the "Host" and "Visiting Sites" fields "Display Mode" to switch from "Edit" to "View" to prevent users changing the pre-poplated values, but I cant figure this out.

 

I have tried...   

 

If(IsBlank(Visitor_Registration_Form.LastSubmit.Host), DataCardValue14_1.DisplayMode.Edit, DataCardValue14_1.DisplayMode.View);

 

on various canvas and item parameters, but cant figure it.  Help.

 

 

2019-12-05_15-09-17.png
Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @StuartSmith ,

    Where do you put your If formula?

    Could you please share a bit more about the "Host" field and "Visitig Site" field within your SP List data source?

     

    Based on the formula that you mentioned, I think there is something wrong with it. Currently, within PowerApps, we could not assign value to a property of one control within another control.

     

    Based on the needs that you mentioned, I have made a test on my side, please consider take a try with the following workaround:

    Set the OnSuccess property of the your Visitor_Registration_Form to following:

    Set(SubmittedRecord, Visitor_Registration_Form.LastSubmit)

    Set the DisplayMode property of the Host ComboBox (DataCardValue14_1) to following:

    If(
     !IsBlank(SubmittedRecord.Host.Value),
     DisplayMode.View,
     DisplayMode.Edit
    )

    or

    If(
     !IsBlank(SubmittedRecord.Host),
     DisplayMode.View,
     DisplayMode.Edit
    )

    or

    If(
     !IsBlank(Visitor_Registration_Form.LastSubmit.Host),
     DisplayMode.View,
     DisplayMode.Edit
    )

    Note: Same logic for "Visiting Site" ComboBox.

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard