on 2024 Jan 04 1:08 PM
Request clarification before answering.
Hi,
this is currently not possible. I use a workaround with the if() clause.
For example I have a variable which is a selection from a Table:
var selection = Table_1.getSelections()[0];
Normally, the function getSelections() returns of Type Selection. However, if the user clicks on the dimension title instead of a dimension member, the function getSelections() would return unassigned which could later lead to a TypeError, if the variable is later used.
To avoid an error message being shown or to show an alternative Error, you can use an if() clause for the code snippet using this variable:
if(selection) {
YOUR CODE
}
For an alternative Error-Message you can use the else statement:
else {
Application.showMessage(ApplicationMessageType.Error,"Your Text");
}
This method should also work for other use cases beside the TypeError.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
52 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.