Kinetic BAQ/RDD Report: How to allow user to enter multiple items, paste-insert gone?

Please tell me there is a way to let users paste in a list of Parts, or whatever else into a Kinetic BAQ or RDD Report filter instead of playing carpal tunnel speedrun any% clicking a potentially massive number of items in the Search Results list.

For reference, everyone in my company is a certified Wizard with the Paste Insert functionality in the Classic UI, which appears to only be available in grids:

1 Like

With the UI that’s built by the out of box ā€œWizardā€, I don’t believe so. You’d need to go into app studio and create a custom layer to add that, then add your customized layer to the menu (or override the existing one)

That search box only takes input of one PartNum at a time, the search dialog allows for multi select but no functionality to paste in a selection list that i’m aware of.

2 Likes

It works okay for me.

Paste Filters

5 Likes

This works for Job Traveler because the system has a ā€œvalidateFilter.Jobsā€ process that it runs.

If you’re just using a BAQ report, its not so friendly.

I was able to hack around it, if you’re interested. Unfortunately, I couldn’t get it to right-click paste insert… but I COULD get it to work with CTRL+V.

You’ll need a custom layer on your BAQ Report Form.

I added a custom textbox where a user could paste in their excel values. We need a ā€œPaste Hereā€ text box because we need to modify the list coming from Excel (or other sources):

I gave the textbox an ID of Filter1PasteInsert… and then bound that to TransView.Filter1Paste.

I then created an event:

Trigger is onBlur of that added textbox

Row-Update #1: I’m taking my pasted value from TransView.Filter1PasteInsert and cleaning that up. When you paste in from excel, it contains carriage returns, line feeds, etc. So, the row update is going to take your pasted value and write the new value to a second TransView field I called ā€œCleanFilter1ā€

Here is my full expression:
"{TransView.Filter1Paste}".split("\\r").join("~").split("\\n").join("~").split(" ").join("~").replace(/~~+/g,"~").replace(/^~|~$/g,"")

The end result SHOULD be a tilde (~) delimited list.

ON SUCCESS of that row-update… perform Row-Update #2

This one takes the ā€œcleanedā€ tilde delimited list from TransView.CleanFilter1 and passes that value to ReportParam.Filter1.

Here’s the preview results… I pasted in (3) values copied from Excel. The row updates turned that into a tilde delimited list… and the ReportParam.Filter1 accepted those as individual values.

Again… not pretty… but if your users are ā€œpaste-dependentā€ā€¦ it will work.

The Simpsons Eating GIF

8 Likes

That’s a keeper for my tips bookmarks!

1 Like

David, I appreciate the effort and insight. I’ll give this a shot and report back, maybe tweak the idea a bit.

1 Like

Very Nice David!

I looked at the JobTrav and turns out it’s a fancy component called a Search Chip Selector.

You bind it to a dataview column and optionally set the labels.

Then you create an OnSearch event

having a search-show action:


validation json:

{
	"validateFilter": "JobNum = '%value%'",
	"errorMessage": "Invalid Job"
}

and a search-value-set action:

Done.
SearchChip

4 Likes

Yes, and that is set up exactly like @bderuvo’s original example using Job Traveler. There is a built in validation filter for Jobs and the Search Chip Selector is bound to ReportParam.Jobs.

The problem is doing this with a BAQ report and the provided ā€œFilterā€ Search Chip Selector is bound to ReportParam.Filter1… and you end up with an error:

image

1 Like

Does it work if you put this in the validation property?

{
ā€œvalidateFilterā€: ā€œJobNum = ā€˜%value%ā€™ā€,
ā€œerrorMessageā€: ā€œInvalid Jobā€
}

Not if I’m not filtering job numbers.

I don’t have a BAQ report that attempts that.

There may be other stock validationFilters… like Part, or Sales Orders… I’m not sure. But I attempted to use validateFilter of ProdCode and it puked.

1 Like

Makes sense. Too bad we’re stabbing in the dark without proper docs. I’ll try some things when I get around to it. I bet it works like:

{
ā€œvalidateFilterā€: ā€œ1=1ā€,
ā€œerrorMessageā€: ā€œNever invalidā€
}

but that kinda defeats the purpose.

!!! EDIT: Don’t do this keep reading !!!

{
ā€œvalidateFilterā€: ā€œ1=1ā€,
ā€œerrorMessageā€: ā€œNever invalidā€
}

Just tried the above, it loaded every single part (I know, big yikes) into the ReportParam.PartNum field:

image

If I use PartNum = '%value%' the entire pasted list is evaluated in the validation rule:

Still haven’t worked out how to split the pasted data and validate each part.

2 Likes

Are we sure it’s meant to? JOBTRAV doesn’t. AFAIK.

Does PartNum = ā€˜%value%’ work for your BAQ?

Are we sure it’s meant to?

Does PartNum = ā€˜%value%’ work for your BAQ?

I have no idea. Still testing things out, reading the documentation helps slightly but… only just slightly.

3 Likes

Yikes is right. Sorry about that. At least now we know what that does. Says: lookup entity I’m searching, where validateFilter returns true. Rather than: is this a valid filter string syntax.

1 Like

FWIW, this does seem to work well. see:

1 Like

FYI I’m swamped, haven’t had a chance to try this yet.

1 Like