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 / Remove default value "...
Power Apps
Unanswered

Remove default value "val" for SingleLine.Text (empty value) in Test Harness

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello!

 

I am trying to use a SingleLine.Text for coloring of a label in my react code control.

Now I have 2 suggested themes, but with the property ClearColor in the manifest I want to allow the user to change the preset colors.

Unfortunately the Testharness always fills in the value "val" so I cannot simulate the situation of having no input for the color (thus the component should use the suggested theme color).

 

Is there a way to remove the value of val?

 

I've ready tried setting the default to an empty string:

 

        <property name="ClearColor"
                  display-name-key="Clear color"
                  description-key="Clear labelbutton"
                  of-type="SingleLine.Text"
                  usage="input"
                  required="false"
                  default-value=""/>
 
Even setting
        context.parameters.ClearColor.raw = null;
 in the init is overwritten apparently.
 
 Obviously I can implement the logic of when the value is empty it should use the theme value, but that doesn't work if "val" is the default testharness initialization value.
 
Thanks for any help!
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    Here is what you can do:

    1. Run harness using npm start command
    2. Hit F12 to open the DevTools
    3. Navigate to "Application" tab
    4. In the left navigation expand "Local Storage" and look for "http://localhost:8181"
    5. In the list of the stored properties on the right look for "<Your Namespace>.<Your Control Name>_properties".
    6. Make a tweak to the "Value" field to set the "Default" for your property (it doesn't accept null or blank string and resets it to "val" - I used " " in this case)
    7. Refresh the harness page.

    Good luck.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard