Application Studio - Data View Event - Help Needed

I am working on a kinetic layer in engineering workbench. In the customization, there are a couple of added textboxes that populate from a BAQ. The BAQ needs to be ran when the user clicks between operations.

I figured I could just run off of following trigger: Type Datatable > Hook Column Changed > Target ECOOpDtl > Columns OprSeq. I have done things similar in the past and it works pretty decently. But this module doesn’t like that trigger. I have tried it a few different ways and couldnt get it to work.

I then went and watched all the events that do trigger when you switch between ops and the only listed one is “rowChanging: RowChanging_ECOOpr”. This holds every operation in it and doesn’t seem to focus into the OprSeq selected like ECOOpDtl does. However, if you go in and click one operation and use the ctrl+alt+V to see all dataviews the ECOOpDtl will show the operation that you currently have selected. If you then click another operation and do ctrl+alt+V agian it will show the newly selected operation. There has to be something I’m not seeing event wise if this data view is changing right?!

You have the correct event, RowChanging_ECOOpr.

It does have all operations in it, the key is what row is currently selected?

epDebug.views tells you in the f12 dev tools console, which you are referencing with ctrl-alt-v. You just need to look a little deeper.

Expand the area above the rows, this is the dataview’s metadata.
In here is a property “viewRow” which tells you which row is currently selected.

So, since this is the currently active row,
If you reference the {DataView.Column}, it will give value ‘20’:

for example, if you are feeding this into a BAQ Where criteria or such, use a new event, with a trigger of Event, Row_Changing_ECOOpr, After


in the baq where criteria, or row-update expression, or wherever you need to reference the OprSeq, use {ECOOpr.OprSeq} and it will be replaced with 20 (as a number, so if you need it as a string, wrap in quotes as appopriate)

2 Likes

@GabeFranco, that was the fastest response I’ve ever gotten! You are 100% correct! After looking a little more closely, that does in fact seem to work. I didnt know that viewRow was even an option in these data views! This is going to help a ton down the road.

As always, you are awesome, and I greatly appreciate the help! Solution goes to you.

3 Likes