Implementation Steps:
1. Navigate to https://make.powerapps.com
2. Click More --> Select Tables
3. Open the Table where you want to change the Form Text
In my Scenario I need to Change the Text Based on Boolean Field.
4. Boolean Field
5. Now Create a Web Resource then Upload Below Code
function onChangeBooleanField(executionContext) {
var formContext = executionContext.getFormContext();
if (formContext.getAttribute("crd20_changetext").getValue()) {
formContext.getControl('name').setLabel('Selected Yes');
} else {
formContext.getControl('name').setLabel('Selected No');
}
}
// crd20_changetext --> Boolean Field Logical Name
//name --> Label to be Changed
6. I have Written function in OnChange of Boolean Field
7. Once Code Written Refresh the Account Form
As i said written Code in On Change
Now if i change Value to Yes then You will see Selected Yes as Label
Now if i change to No then You will see Selected No as Label
That's it 🙂
Using Change label in JavaScript we can change the Label Text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.