Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

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

(0) ShareShare
ReportReport
Posted on by

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,304 Most Valuable Professional on at
    Re: Remove default value "val" for SingleLine.Text (empty value) in Test Harness

    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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 109 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard