Pulling UD table fields in app studio, but not User Defined Fields?

Good Morning Epicor Peeps!

I am working on recreating some of our entry screens in the kinetic format using app studio and have ran into something that seems pretty tricky. My company has a system where we include notes (saved on the UD02 table) that are entered in custXPartRef that is vital to the warehouse system we have. Previously the event wizard was used to save the data to the UD02 table.

I am working on copying this concept to the kinetic version, however I am unable to pull the data into the text field. Key3 on the UD02 table is equal to the XCustPart in CustXpartref table, however I am not sure how I can pull that data into the text field, allow people to edit it, and save to the table once the customerXpart is saved.

So far I successfully created a dataview and was easily able to pull the UD02 table into a grid used the grid options, but the filter I made isnt working to only pull data for the specific key that matches the customer part # that was selected. Also how do I pull only one row data from my dataview into a text field? I feel like the text field doesnt leave us with many options, so I am guessing I have to filter it then pull data somehow using the events? Or maybe a data rule but I feel like that is the wrong way. If anyone has a suggestion I would love a tip or two! Heres what I got so far:

Dataview, I am pulling from a BAQ seemed like the simplest way, but I can pull from the Ice service im sure:

Then here is the grid I got working, and the sad and empty field that I cant do anything with just yet. The field’s epbinding is set to UD02.UD02_Character01.

And last but not least, here is the filter I am trying to apply. I feel like it is applying just after the page loads? I have it set under the BAQ options of the dataview and the grid but no luck actually filtering any data.

So if anyone has any ideas how to accomplish my goals let me know, thanks!

2 Likes

You probably need single quotes in your Where clause.

UD02_Key3 = '?{CustXPrt.XPartNum}'

You mentioned enabling the user to edit the UD table… if you’re using a BAQ, is this an updateable BAQ?

1 Like

Took a second to load my change but that filter worked thank you!

but that is a good point, no it isnt an updateable BAQ, Ill go ahead and change that

last part of the puzzle then is to figure out how to pull the existing character field after it is filtered into the text field :thinking:

Well, your event that is calling your BAQ is including the Where clause which is now going to filter the results it pulls down from the BAQ query.

So, the only rows that will be returned to the UD02 dataview will be where UD02_Key3 = '?{CustXPrt.XPartNum}'

One of the columns in that UD02 dataview is the UD02_Character01 column.

So, if your textbox is bound to UD02.UD02_Character01, you should see the existing text (which was pulled down via the BAQ call into your dataview) you should see that existing text populated.

If there are multiple matches, that means you’ll have multiple rows in the dataview. So, you should see the existing text in row [0] of the dataview. If you want to select a different record (row)… you might need a grid that shows the results of the BAQ so you can select the record you want.

As far as how to “update” (save any edits to the text)… I’ll be honest, I’m not overly sure. To this day, I’ve never set up a UBAQ and a dashboard. I tend to go the other route (which you mentioned earlier) and use the Ice BO to create my UD02 dataview and then create an update event.

I’m sure others on the forum can help with that bit… or I’m sure there are other posts on the forum showing how that is done.

1 Like

Unfortunately, since I think the BAQ loads before I can select a customer part numb, the filter seems to be applying before I load the customer part it is supposed to be using so the filter is empty. I tried to be clever and created a new event that runs the dataview event after the view change which the debug tells me is the last event that runs, but it doesnt seem to be working.

the filter does work when applying it to the grid directly, but im not sure what I am doing wrong still I feel like it should just work? Heres where the filters dont work

And I threw it on the dataview for good measure, but no cigar

You need to use this as your trigger to run the BAQ.

Set your Trigger to:

DataTable
Column Changed
CustXPrt
XPartNum

That should make your BAQ fire every time someone selects (changes the value of) CustXPrt.XPartNum

1 Like

Still not working :frowning: I thought something bugged out so I recreated the dashboard but yeah I cannot get this text field to pull anything up for the life of me. Maybe there is a way for me to add an event that grabs the field but I am just spit balling.

Are you familiar with the debugger in the browser? Can you see if your dataview is being populated?

1 Like

I am familiar, and no it doesnt look like the event is firing at all? Unless it is loading before I can enable the debug logging, I dont see it.

Heres a text file with a copy of the logs if you would like to take a look
logs.txt (120.4 KB)

All I have to go on is the initial images of your dashboard… but, how does it work?

You have a Customer PartNum at the top… that is read only. How/where/when is that getting chosen/selected?

What is the grid showing? Is that the BAQ results (UD02 dataview)?

Try changing your event trigger to:

DataTable
Column Changed
KeyFields
XPartNum

Looking at your log, your CustXPrt dataview is already populated via rest call… and then the CustXPrt.XPartNum value is getting passed (row-update) to KeyFields.XPartNum. So, we’re actually seeing that change happen.

I’m hoping if we make THAT change trigger your event, you may see your BAQ fire.

That did the trick! Nice thinking, as always thanks for your help, figuring out how these events work is pretty tricky without knowing how rest calls really work, gotta study up more on that. Regardless I will update the post once I get the fields to become updateable as intended, thanks again!

1 Like