Return value of RM.Client.setSelection(...)
Hello all!
is there a way to find out if RM.Client.setSelection(...) has really selected the artifacts desired?
Background: the function does not select anything when the artifacts are currently not displayed (e.g. hidden hierarchy level, filtered, etc).
The function seems to always return 'undefined'
Thank you!
|
One answer
There are two ways to check:
- the function returns false of any of the artefacts cannot be selected for any reason, and doesn't modify the current selection, so if you have nothing selected to start with then nothing will be selected afterwards
- the function triggers the ARTIFACT_SELECTED RMEvent if successful
So firstly you can check for a return of false, but you can also use the RMEvent.subscribe() function to register a callback to see what's been selected.
Comments
Thanks for your feedback. I expected, that there is a return value. However, I don't get a return value when calling setSelection(...), but always 'undefined'
I am running 6.0.6 iFix009, is there any issue known, or is it me not doing it right?
Davyd Norris
commented Jul 08 '19, 7:34 p.m.
In JavaScript, an undefined is considered to be false (or falsy, to be precise) but I would have expected it to return an actual false.
Can you post your full code snippet? I would like to see where row.ref is defined and how it's being set.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.