Skip to main content
Community site session details

Community site session details

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

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

Like (0) ShareShare
ReportReport
Posted on 11 Apr 2023 15:46:06 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 11 Apr 2023 at 20:56:27
    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 our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473