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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,185)