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 / Using IF for getting d...
Power Apps
Unanswered

Using IF for getting different Default property Value in a text input

(0) ShareShare
ReportReport
Posted on by 10

Hi,

 

I want to condition the Default property in a text input in a Form. If is a NewForm should be empty that will be filled after a selection from a DataTable, if is a EditForm should be a corresponding line from my sharepoint selection list based on a gallery selection. 

 

something like this

 

If(NewForm(Form1),Parent.Default,Left((Split("TextInput3", ";")).Result))

 

where Form1 is the EditForm that I am using to edit and add new records and TextInput3 is the TextInput that is having the selected line from Data Table

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Johnson1 

    No need for If().

    Coalesce(Parent.Default,Left((Split("TextInput3", ";")).Result))

    Parent.Default will be blank for new forms.

  • Johnson1 Profile Picture
    10 on at

    Thank you for your quick reply @Drrickryp ,

     

    I am getting this error

     

    Johnson1_0-1667401323676.png

    I need for this this InputText from this EditForm to behave in three different ways for this reason I thought that IF

    will help me

     

    1. View corresponding field from selected line in a gallery

    2. Be empty in case of NewForm(Add new Record) is pressed to add a new record (will get updated once I will select a line from DataTable by picking up the value from TextInput3 )

    3 Get same value as the TextInput3  

     

    ATM only first two are fulfilled,  

     

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Johnson1 

    Coalesce() reads values from left to right until it finds a non-blank value. It can contain any number of elements. 

  • Johnson1 Profile Picture
    10 on at

    Solved, through IF statment on default property

     

    If(IsBlank(Parent.Default),TextInput3 ,Parent.Default)

     

    Thank you for your suggestion, did not knew about Coalesce() function use/behaviour, something new every day 🙂

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 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard