cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dlprentice
Responsive Resident
Responsive Resident

How to disable "Text input" if value retrieved from data source is null/empty/blank.

We have ticket numbers that get assigned to request for change submissions. We don't want the text input field or the submit button to be editable/clickable  if the value that shows up exists from our SharePoint list. If nothing shows up we want the field to be editable, and the submit button to be clickable.

 

The name of our data source that contains the 'FootPrints Ticket Number' :

 

'Requests for Change'

 

The name of the input field:

 

InputField1

 

The name of the submit button:

 

FootprintsCreate

 

 

Screenshot 2021-02-12 142004.png

 

Screenshot 2021-02-12 142444.png

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@dlprentice 

You cannot set a value on a control like that in PowerApps.  PowerApps is a no code platform that derives its values on controls with formulas, just like Excel uses formulas to derive information in a cell.

 

For your TextInput1 control, set the DisplayMode property to:

   If(IsBlank(Parent.Default), Edit, Disabled)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@dlprentice 

You cannot set a value on a control like that in PowerApps.  PowerApps is a no code platform that derives its values on controls with formulas, just like Excel uses formulas to derive information in a cell.

 

For your TextInput1 control, set the DisplayMode property to:

   If(IsBlank(Parent.Default), Edit, Disabled)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thank you for also taking the time to explain the way values are derived. We were way over thinking how to accomplish this.

RandyHayes
Super User
Super User

@dlprentice 

Happy to help.  Yep, don't overcomplicate.  Keep it simple.  Drop the developer hat at the door and put on the Excel formula hat....PowerApps will be your best friend then. 😁

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,605)