Sündmused
Power BI DataVizi maailmameistrivõistlused
14. veebr, 16 - 31. märts, 16
Nelja võimalusega siseneda, võiksite võita konverentsipaketi ja jõuda LIVE Grand Finale'i las Vegases
LisateaveSeda brauserit enam ei toetata.
Uusimate funktsioonide, turbevärskenduste ja tehnilise toe kasutamiseks võtke kasutusele Microsoft Edge.
Returns a reference to the form or an item on the form depending on where the method was called.
ExecutionContextObj.getFormContext()
Type: Object
Description: Returns a reference to the form or an item on the form such as editable grid depending on where the method was called. This method enables you to create common event handlers that can operate either on a form or an item on the form depending on where its called.
The following sample code demonstrates how you can create a method that sets notification on a form column or editable grid cell depending on where you registered the script (Column OnChange event or editable grid OnChange event):
function commonEventHandler(executionContext) {
var formContext = executionContext.getFormContext();
var telephoneAttr = formContext.data.entity.attributes.get('telephone1');
var isNumberWithCountryCode = telephoneAttr.getValue().substring(0,1) === '+';
// telephoneField will be a form control if invoked from a form OnChange event;
// telephoneField will be a editable grid GridCell object if invoked from editable grid OnChange event.
var telephoneField = telephoneAttr.controls.get(0);
if (!isNumberWithCountryCode) {
telephoneField.setNotification('Please include the country code beginning with '+'.', 'countryCodeNotification');
}
else {
telephoneField.clearNotification('countryCodeNotification');
}
}
Sündmused
Power BI DataVizi maailmameistrivõistlused
14. veebr, 16 - 31. märts, 16
Nelja võimalusega siseneda, võiksite võita konverentsipaketi ja jõuda LIVE Grand Finale'i las Vegases
Lisateave