Haven’t done one of these in a while and a good topic came up from another thread that I figured I’d make a more official post on.
How in the heck do you wire up a UBAQ to a grid in Kinetic and, you know, actually make it update?!
Drum Roooooolllllllll
You gotta work for it. Boooo.
This step is hopefully obvious, but go build your UBAQ. I’m not gonna get into that, there are plenty of posts on how to do so. Work yer Google-Fu on EpiUsers.
Open up Application Studio on the form you want to add the grid to.
Create a DataView to hold the BAQ information for the update
Add a new Tool for Save. Give it an ID for use later, a description (what will be shown to the user when they hover, an icon (optional), and add it to the primary toolbar (optional).
You can find the icons here: Material Design Icons (pictogrammers.github.io) Use whatever you want, just make sure that it’s in the format of “mdi + icon name”. For example, the icon’s name that I used was “mdi-ghost”, so I would enter mdi mdi-ghost
Context with my UBAQ: I just made a simple UBAQ where I can update the TypeCode. It will only show the top 10 purchased parts, so you can see that when I change the top to to manufactured and save it, they drop off after the refresh.
Hmm, everything was going well until the erp-baq widget. I don’t have the same options on mine that you display above. Any idea why? I’m on version 11.2.100.12
@hmwillett In step 6, you’re adding columns from your BAQ, but it doesn’t look like you bind your grid to the dataview or BAQ until step 9. How do you properly add the columns you want to see? And is there a difference if you when adding them under Grid Model > Columns or Grid Model > Provider Model > Columns?
I always seem to have an issue creating columns for BAQ Dataviews. If I do nothing under the columns it will return everything from the BAQ, but the column headings are ugly. I can’t seem to find the right location and format to add individual columns.
BIG IMPORTANT You need to save and exit your custom layer before these changes fully take effect. If you go directly to preview, data does not load. Upon re-opening the kinetic custom layer everything was all good.
BIG IMPORTANT #2 If you’re BAQ Dataview is utilizing a Parent/Child Relationship. All of the relationship fields must be added to your columns
Thanks Hannah! This worked great. My mistake when running though this is I didn’t include all my columns and I only added the columns I wanted to display. This meant I missed my key fields that were needed by the BAQ update.
So what your really asking is how do you add a control to a cell in a grid.
This is the closest I could find… But in your instance you would use a button then add the icon to that from here Material Design Icons a recent post from
here is another link that talks about adding icons.
I did try to have a crack at this myself, but to no avail…
Funnily when I try to look at the attachments slider on forms in AppStudio I can;t find them… @hmwillett am I just going blind?
In the example shown there was a combo box on the grid. I understand you want to puta a button that will fire an action similar to the attachments slider
@hmwillett Thanks for this awesome writeup, it helped me get started.
I had previously had a grid setup with a BAQ in a new slider, but I found I did not need a dataview (or the baq-update and baq-get steps in the event).
So I was using this post to switch the grid over to use what is now an Updatable BAQ.
I created the dataview, baq schema, and specified my new baq,
Also put the view id in the Provider Model EpBinging setting.
The problem I am hitting now, is when it hits the baq-update in the event (assuming I have rows modified), I get this error:
and the network response for the query shows:
My updatable query is primarily QuoteDtl fields and the required key fields from QuoteHed.
When I do an update using the BAQ designer, I do not get the error
I did figure out my sql error, got access to server logs (cloud/saas customer)…
stupid typo on one of column names…QuoteHed.QuoteNum instead of QuoteHed_QuoteNum…doh
Is there a similar post somewhere to do this on a Classic form? I need an updatable grid showing UD records related to a Part that is selected, and an edit form to make entry of new records outside the grid possible. I can make a dashboard that is updateable using the wizard, but I can’t show a single record in fields like you could in a tracker view.
@hmwillett
In classic dashboards, when a row was being updated, both the old (rowmod = “”) and updated (rowmod = “U”) were sent to the update method of the BAQ.
For an old classic dashboard I used an updatable BAQ directive in which I checked which field was being changed by comparing the old and updated row with eachother.
This UBAQ Directive is no longer working in a Kinetic dashboard, since only the updated row is being sent to the Update method.
Is there any way to send both the old and updated row to the update method?
My UBAQ Directive code looks like this:
var updRow = (from row in queryResultDataset.Results
where row.RowMod == IceRow.ROWSTATE_UPDATED
select row).FirstOrDefault();
if(updRow != null)
{
var oldRow = (from row in queryResultDataset.Results
where row.SysRowID == updRow.SysRowID
&& row.RowMod == string.Empty
select row).FirstOrDefault();
if(oldRow != null)
{
for(int i = 0; i < updRow.Table.Columns.Count; i++)
{
if(!new string[] {"RowMod", "SysRowID", "RowIdent"}.Contains(updRow.Table.Columns[i].ColumnName))
{
if(Convert.ToString(updRow[i]) != Convert.ToString(oldRow[i]))
{
// do stuff
}
}
}
}
}
I was going to say the uBAQ works the same as ours are working fine in Classic and Kinetic. We however don’t evaluate the old row in ours thus we wouldn’t catch it. Please let support see it as the it is.