Naresh Gubbala
Hi ,I was trying to get the row index when clicked on a row button(Say “Detail” button) and append that to a BPM variable.
Not sure whether I was missing out anything?
- Added a private variable index(Integer)
- For the event onClick of button : ${../index}.setData(${../Table1}.(me.ui.getIndex())); // this is getting the current index of the row
- trying to refer the index in script out side the coach : log.info(“Index Value appended is :”+tw.local.index);
- Getting the below response
- [2/3/17 13:02:13:423 PST] 000020c7 LoggerScripta I Index Value appended is :undefined
I was using spark UI , BPM 8.5.7
Tomáš Navrátil
Hi Naresh,
Try changing your onClick script on the button to ${../index}.setData(me.ui.getIndex());
That should be the correct way to get the row index.
Tomas
SPARK Support
Hi Naresh,
I would use a Data control bound to the variable that you are trying to retrieve. Then call:
log.info(“Index Value appended is :” + page.ui.get(“Data1”).getData());
Depending on the data bound, you may want to try Stringifying your data.
Regards,
Stephen P.