cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aaronsta
Regular Visitor

Default Value not returning expected result Parent.DataField

Hi all, I am building a PowerApp.

Under Data Cards > Data > Default

which shows the default value of a Text Input field of a data card.

 

The following works and produces the expected result (a telephone number):

 

 

 

LookUp('Member Register', Email in User().Email, EmergencyContactTelephone)

 

 

 

But this does not (and returns EmergencyContactTelephone ) :

 

 

 

LookUp('Member Register', Email in User().Email, Parent.DataField)

 

 

 

(Note: that Parent.DataField returns EmergencyContactTelephone )

 

What this formula is doing is looking up in a Microsoft List (formerly SharePoint List) called "Member Register" under the column "Email" if it contains User().Email (the e-mail account which is logged in), and if so to return the Emergency Contact Telephone number from the "EmergencyContactTelephone" column.

I have about 50+ columns, and having to individually copy over the DataField as text into the Default field will create problems, and also potentially cause future issues in terms of the maintainability of the PowerApp, rendering it useless if a change is made and I am not there to update the PowerApp.

 

Help?

3 REPLIES 3
PowerAddict
Super User II
Super User II

@aaronsta apologies for the obvious question but what have you set the DataField property of the data card to? I just tested it out and it works fine, so I am assuming there might be something going on with how the DataField is populated. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

Hi Hardit,

Thanks for the reply!

The Data Card has "EmergencyContactTelephone"  (including the double quotation marks) in the DataField

(Also note I just tried this formula Mid(Parent.DataField, Len(Parent.DataField)-2), as I suspected it was returning the quotation marks as-well, but instead it returned

mergencyContactTelephon (i.e deleted the first and last characters).

The DataCard is adapted from a Form template (i.e. Insert > Forms), and has been unlocked and changed around a bit, I also tried it with a fresh DataCard with the same outcome.

aaronsta
Regular Visitor

                             

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (72,614)