App Studio - Send Value of Current Row/Column to BAQ Where Clause

Okay… I’m missing something and have exhausted both my brain and my patience…

I have a Dashboard with a grid. Grid is populated by a BAQ Dataview.

I’ve made one column in this grid a link. On-Click… opens a slide-panel.

That panel also has a grid, populated by a different BAQ. I’ve tried this both by populating another BAQ Dataview (via kinetic-baq event) and/or by populating the second grid via the provider model calling the second BAQ directly. Either way, I get the same results…

This is the grid on my main page:

image

I’m trying to click the “Actual Job Hrs” link… which should open the slider and show the Labor Details of the respective job number (both highlighted green).

However, the labor details that populate the grid on the slide-out are always those for the first JobNum in the main grid’s dataview (highlighted blue)… 060366-6-1 in this case.

image

I cannot get it to pass the JobNum of the row corresponding to the link I clicked on.

If I don’t put a Where Clause, the BAQ will run wide open… so the BAQ is definitely working. But my where clause is always providing the first value of the first row of the source dataview, not the row I’ve selected in the grid.

Do I need to set that somehow so it will pass the correct value?

If I do this via kinetic-baq “get” event, I’m using this where clause:
JobAsmbl_JobNum = '{Backlog.JobAsmbl_JobNum}'

If I do this via provider model, I’m using this where clause:
JobAsmbl_JobNum = '??{Backlog.JobAsmbl_JobNum}'

I’ve tried that version both in the Where Clause and the Where List.

In all cases… it passes a value… but its always from the first row of the source “Backlog” dataview.

If you can figure out how “clicking” on a line works, you should be able to then assign that row as the current row.

Yeah, i was digging through the debugger trying to see if there was a way to see the “selected” values… or “current” values. For example, in debugger, can you see what the current selected dataview is? The currently selected row (index) in that dataview?

Haven’t stumbled onto it yet (if its available in there).

Yes. Hold on and let me find it to take a screen shot.

The viewRow gives you the index of the row in the DataView. If you open up curDataRow, it actually holds all of the columns. Not sure how to access this though.

1 Like

Something new to poke at, at least! Thanks!

Well, I’ve found I can call out a specific row index number, or select First or Last in the row-current-set… but I haven’t found a way to have it set the selected row as the current row.

I’m almost positive the way this always worked was that the UI would automatically set the row that gets clicked as the current row… am I way off base?

Perhaps this is all part of the grid-row-selection-jumping-madness that is clobbering 2024.2.4?

I’m definitely seeing the row values change when I click my link(s)… so, I wouldn’t have been surprised if the “current” row wasn’t the correct one. But I can’t get it to move off of row ‘0’.

Did you create an event and use the set current row widget?

1 Like

Are you sure you aren’t running into that grid row bug that’s going on?

Try selecting the whole row, and then clicking your link.

That’s what i was trying to do here:

I’m also wondering that.

… but i don’t see how i could know for sure besides never having an issue before with this type of event.

Tried that. That’s why my images above of my main grid has s yellow highlighted row. I tried to select the row, then click the link… still passed the JobNum from the first row (row ‘0’).

1 Like

ok :sob:

George Clooney Reaction GIF

2 Likes

Okay, not sure what’s going on.

@hmwillett (sorry to drag you in, but just curious if you’ve ever seen this type of behavior)…

I created the above dashboard… to be honest I can’t remember if I used any of the wizards or not.

I then created a BAQ Dataview called “Backlog”.

Dataview populates fine… and my grid tied to the Backlog binding populates fine.

I then created a slide-out with another grid, populated by a different BAQ. In this case the grid is just populated via BAQ in the Provider Model.

The issue I was having was an onClick event of a grid column link and passing the JobNum from the row clicked on in the main “Backlog” populated grid on the main page to Provider Model > BAQ Option > Where clause on second page.

I had that set to: JobAsmbl_JobNum = '??{Backlog.JobAsmbl_JobNum}'

The problem was, no matter what row I clicked on… it always passed the first job number (from row (0) of the Backlog DataView/Table).

After some scrutinizing, I saw that the row value of my Backlog dataview was never changing:

After more scrutinizing, I noticed another dataview I didn’t catch before: erpView_0

THAT view DOES update the row value, based on the row I click and if I change my where clause to: JobAsmbl_JobNum = '??{erpView_0.JobAsmbl_JobNum}' everything works as I expected it to, the grid on the 2nd page updates with the correct labor details.

The REALLY weird thing is after playing with the dashboard and clicking/testing a few different rows… if I then look at my views… new erpView_X dataviews keep getting added for each row I click on.

Does this make any sense? Have you ever seen this type of behavior? Maybe this is typical and I’ve just never noticed?

1 Like

Nope. I have never seen that. Or I don’t remember. Either way, it’s not common.

I guess I would question how your event is set up and how your grid properties are set for your click event/grid.

I mean, doing a quick test with a message handler sends the correct job for me and does not creating random views.
GridLinkClick

Slide out works fine too.

GridLinkClickSlider

Yeah I’m right there with you:

Main Grid:

Not much to the slider-open:
image

Slider page grid Provider Model: Just calling a BAQ
image

image

… just can’t figure out why I have to use erpView_0 to get that Where clause to work vs. the name of the driving dataview. Use “Backlog” results in a stagnant row value.

Maybe I should just start-over. Wouldn’t be the first time see a SNAFU during app studio work.

Thanks for checking and confirmation!!

3 Likes