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

Renaming an Object in a DataCard Breaks "Hidden" Properties

I have a canvas app within which I have a form that contains numerous fields; DataCards containing DatePickers.  I wanted to rename the DatePicker objects to something that would be more memorable than DateValue1_2, so I used the "rename" menu option that appears when you right-click on an object within a DataCard.  Considering that I had not added or used the field I am renaming anywhere in the current form, I assumed everything would be fine.  Nope.  Not only did the rename function NOT change the object name everywhere it was referenced within the DataCard -- all properties that were set by default and not altered by me -- it apparently failed to update the field name within properties that I can't even see/touch within the PowerApps field-editing UI.  

 

Those four "hidden" properties are:  PressedBorderColor, Hoverfill, PressedFill, and HoverBorderColor.  

 

I renamed the DatePicker back to what it was originally named, but those four properties are still reporting the same error: 

    Invalid use of "." <fieldname>.<HiddenProperty>.

 

How can I fix these errors if I can't touch those properties?  I suppose I am going to have to delete the offending DataCard from the form and re-add the field, but there's got to be a better way..AND...why is renaming a field such a pain???  

 

ErrorsInHiddenProperties.png

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @bozopriester ,

Firstly let me assure you that you can certainly rename any object, as long as

  1. The name is not somewhere else on an object in the app
  2. It is not a name used somewhere else, particularly a data field name. It will generally let you do this, but causes chaos at times.

It is the second one here I believe you have done (easily fixed however). If you rename the control to the same name as the value it holds, PowerApps has a bit of a spasm and says “don’t be silly, a field value has no Color.”

To fix, rename the control to something else (my renaming of data controls are simply the field name and the first letter of the screen name - makes the very easy to remember when referencing).

Then go to the four values (easiest way is to click the little red x) and change the field name in there to the new one you have created. Once fixed, the x will go away.

BTW I know this well for doing it at too regular intervals . . . 

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

 

View solution in original post

2 REPLIES 2
Super User III
Super User III

Hi @bozopriester ,

Firstly let me assure you that you can certainly rename any object, as long as

  1. The name is not somewhere else on an object in the app
  2. It is not a name used somewhere else, particularly a data field name. It will generally let you do this, but causes chaos at times.

It is the second one here I believe you have done (easily fixed however). If you rename the control to the same name as the value it holds, PowerApps has a bit of a spasm and says “don’t be silly, a field value has no Color.”

To fix, rename the control to something else (my renaming of data controls are simply the field name and the first letter of the screen name - makes the very easy to remember when referencing).

Then go to the four values (easiest way is to click the little red x) and change the field name in there to the new one you have created. Once fixed, the x will go away.

BTW I know this well for doing it at too regular intervals . . . 

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

 

View solution in original post

Yeah, it looks like I had been renaming the field to something that already existed somewhere else.  I've tried several other similar renames this morning and they're all behaving properly.

 

Details.  Details. Details.

 

Thanks!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,826)