App Studio: Row-Find not finding all rows

I’m trying to use the row-find widget as a validation step in an application. However it is only finding some records in the dataview and not others. The parameters of the row-find are:

Dataview: PickQueue
Expression: PickQueue.MtlQueue_PartNum = ‘{SearchResults.PartNumP}’
EpBinding: SearchResults.PartExists
Mode: Exists

For context: ‘PickQueue’ view that is populated with BAQ data through a rest-erp widget. ‘SearchResults’ is a view that stores temporary parameters.

The user specifies a part number in a text box (EpBinding set to SearchResults.PartNumP). When the value of that box is changed, it triggers the row-find widget. The row-find widget looks at the ‘PickQueue’ data to find a match in the MtlQueue_PartNum column and returns whether or not the part number exists.

Some records it finds. For records it does not find, the developer tools show “invalid argument outside of criteria.”

When using the debug tool, all of the expected records show up in the PickQueue data view, including the records that the row-find widget could not find.

I tried both an “exists” and an “index” row-find. For the records it found, the index was correct based on what was showing in the PickQueue data.
PickQueueData

Any ideas as to what I’m doing wrong here?

I have tried to Use the Row-exists before and i struggled on using it. But i did get something to work, and i have used it in place of row-exists in all places i needed validation.

I used dataview-condition set the “Dataview” parameter to a BAQ filled Data view and left the Iterative event blank. The behavior that this produces is similar to the behavior you are trying to produce.
It checks the Expression against every Row in the “Dataview” Parameter, all rows that equate to true are added to the Results parameter(this can sometimes be left blank, don’t know why sometimes it can be blank and others not.), But it doesn’t run the Iterative even on each row success because its blank.

Then you use the on match/on single match/on multiple to determine the pathways you want to go down. so i’m my case if the entered bin ( a bound textbox) was a bin that existed in “AvailBins” then the “on single match” would trigger, if the entered bin wasn’t on the List it would do “no match”, and if there was “multiple matches” it would do nothing because i didn’t capture that case.

1 Like

@BennyL

I’m also struggling with ‘Errors in criteria parser’ when trying to use row-find

So I’m trying your suggestion of using dataview condition
(and I am still getting ‘criteria errors’)

Does your expression really only have a single ‘=’
I thought it was always ‘==’ or ‘===’ for comparisons

I’m also surprised you don’t need { }'s around each side of the comparison

thanks

@BennyL @steved09

I am shocked, a single equals and no braces worked for the dataview condition,
so then I tried the same approach with row-find and it worked
(I am using ‘RowIndex’ for the mode in row-find)

This has been an issue for me for some time trying to get row-find to work

things are so inconsistent in app studio !!

1 Like

I got rid of the quotes and the braces on mine and it worked for me as well! Wish there was some kind of formatting guide out there somewhere.

This is one of the worst things about the Events editing area, so little documentation for things like this…

Sometimes you use ViewName.FieldName
Sometimes you use {ViewName.FieldName}
or “{ViewName.FieldName}” for strings
but now there is an inconsistency in expressions… single =, vs == or ===

my understanding is alot of the backend for this is javascript,
so it doesn’t make sense to me that a comparison expression would be a single =
…that’s for assignments !!

So the reason for Why === works in some places and = works in some places and why some times you need ‘{}’ and others you do not need any brackets and quotes is because some Events uses JSON as the Language some some use SQL and some use Java Script. Depending on How the field is being decoded depends on which Syntax you have to use.

This is fine in concept, but most fields DO NOT tell you which language is the correct one for each Field. Like you said if the documentation was better then it would be way easier to use unfortunately Epicor relies on the community to make things like the control compendium to use the software.

Im glad you got it to work though.

1 Like

Yes, that’s why we need an “Event Compendium”, @hmwillett does excellent documentation, but that’s a heavy lift I think…

I counted there’s only 77 event ‘widgets’ and some of them have so many different ways they can be used

I’m expecting/hoping eventually Epicor will beef that section up in the App Studio Reference guide, right now they only cover 22 ‘commonly used’ ones.

Thanks

1 Like

Thankfully, many of those have helpful tooltips … but too many are a complete mystery

Is this fixed per field, or per event? Where it could be identified in the field help - tech ref guide (or even by us, in an event compendium)? Programming in App Studio by trial and error makes it nearly impossible!

It is fixed per event field, Sadly the only way i know is that normally if you hover over a property there is a 50% chance it will show you what syntax you need to use (this determines the Language). Totally agree that trial and error on app studio is the most frustrating part of my job right now.

My best advice is just always be testing each event you are doing with the debug menu up to see if the statement you typed is being evaluated correctly, if it isn’t then try using a different languages syntax until it works. Sorry my advice sucks but brute force is the only way i have found reliable.

3 Likes

Yeah, it’s especially frustrating for someone like me who’s not a programmer by trade. It’s been a lot of trial and error and plowing through all of the tutorials by @hmwillett, who is currently one of my favorite people.

1 Like

Mason Ramsey Reaction GIF by MOODMAN

1 Like