cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Champion
Community Champion

Re: Renaming an Object in a DataCard Breaks "Hidden" Properties

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
Highlighted
Community Champion
Community Champion

Re: Renaming an Object in a DataCard Breaks "Hidden" Properties

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

Highlighted
Frequent Visitor

Re: Renaming an Object in a DataCard Breaks "Hidden" Properties

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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,585)