• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

EVENT RULE HELP

bwilkinson

Well Known Member
This is what I have.

Create a new find browse form.
Add a DD Field to the Grid. (AN8)
Created the Following ER Code attached to the find button.

F0101.Open
F0101.Select All
F0101.Fetch Next
While SV File_IO_Status is equal to CO SUCCESS
F0101.Fetch Next
End While
F0101.Close

The mapping of the fetch next is to "*AddressNumber" ==> "GC addressNumber"

When I run this is takes a about 20 seconds, and when I check the log I can
see it processed the Fetch next
Operation a lot. So I'm assuming the code works, my problem is that nothing
shows up in the Grid. Is there a
grid function that I need to perform or am I missing a larger piece of the
puzzle.

-Brian


William "Brian" Wilkinson
Quickie Manufacturing
Bwilkinson@quickie.com
856-829-7900 x143

JDEdwards OneWorld B7332 SP14.1
Microsoft Windows NT 4.0 Server Platform SP6a
Microsoft Windows NT 4.0 Terminal Server
Microsoft SQL Server 7.0 SP2 with hot fix 851
Microsoft Mdac 2.5
Citrix Metaframe 1.8
=========================================



William “Brian” Wilkinson
Quickie Manufacturing
Bwilkinson@quickie.com
856-829-7900 x143
 

Zoltan_Gyimesi

Legendary Poster
Brian,

What is your target? What do you want to do?
Your code on find button mapping File I/O to GC value seems me a little bit false way.
Please, let us know more about your task (why do you want to do) and I am sure you will get the appropriate solution.

Zoltán


B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

vbojan

Well Known Member
Hi Brian,

Use "F0101.Select" instead of "F0101.Sellect All". Second one will select all record in F0101. Open and Close shouldn't be necessary on B733.

Hope this helps,

Bojan.
 

bwilkinson

Well Known Member
The reason is I'm just using this as proof of workability. I was trying to
see if I could get a find / browse from to work without an attached View and
control the grid manually. IE add, remove rows and colums.

The end result will be a form / grid that is built on the fly. Basically its
going to read Item Master then take the item numbers and do various checks
on almost all files that use item number. The grid would then be loaded with
item number and flags to say whether or not the Table / Data Item is ok. IE
do the item Base Record Flags Match the Location Record Flags , such a GL
code, record type, is there BOM for all Locations, is there routings for all
Locations, Do Prices Match. Is there Cost for each Item. Etc...Etc...Etc...
I know I can attach the Item Master View, use it as the driver and attach
the processing to "Grid Record is Fetched" or whatever step I feel like
grabbing the data at before it is displayed.

I have since done what I said I could and that was use the V4101F attached
to the form.
Added 3 fields from the View to the Grid
Added 4 DD Fields to the Grid

And attached the code to the "Grid Record is Fetched"

// ============================================
// INIT FIELDS
// ============================================
GC ROUTE = "N"
GC BOL = "N"
GC OP #10 = "N"
GC CHECKL.VS.M = "N"
// ============================================
// CHECK FOR VALID BOL (F3002)
// ============================================
VA evt_TypeBill = "M"
F3002.Select
If SV File_IO_Status is equal to CO SUCCESS
GC ROUTE = "Y"
End If
// ============================================
// CHECK FOR VALID ROUTING AND OPERATION 10
// ALSO CHECK RUN LABOR VS MACHINE LABOR (F3003)
// ============================================
VA evt_TypeRouting = "M"
F3003.Select
If SV File_IO_Status is equal to CO SUCCESS
GC BOL = "Y"
End If
F3003.Fetch Next
If VA evt_SequenceNoOperations is equal to "10.00"
GC OP #10 = "Y"
End If
If VA evt_RunMachineStandard is equal to VA evt_RunLaborStandard
GC CHECKL.VS.M = "Y"
End If

And this works great. I still have to add more checks for other files, but
the base idea works.

-Brian

William "Brian" Wilkinson
Quickie Manufacturing
Bwilkinson@quickie.com
856-829-7900 x143

JDEdwards OneWorld B7332 SP14.1
Microsoft Windows NT 4.0 Server Platform SP6a
Microsoft Windows NT 4.0 Terminal Server
Microsoft SQL Server 7.0 SP2 with hot fix 851
Microsoft Mdac 2.5
Citrix Metaframe 1.8
=========================================




William “Brian” Wilkinson
Quickie Manufacturing
Bwilkinson@quickie.com
856-829-7900 x143
 

Zoltan_Gyimesi

Legendary Poster
Re: RE: EVENT RULE HELP

Hi Brian,
At first, thanks for your explanation.
Please, let me some observation, comment.

1.) SV_File_IO_Status will always be CO_SUCCESS after a Select because resulting no records is not a fault. Use FetchSingle alone or one FetchNext after Select if you want to check the existence of one or more related record.

2.) Please, examine and try to use the
* Clear Grid Buffer
* Copy Grid Row To Grid Buffer
* Delete Grid Row
* Get Grid Row
* Insert Grid Buffer Row
* Insert Grid Row
* Suppress Grid Line
System Functions (Grid Category in ER Designer for APPLs).
Maybe you can use them making your application more sophisticated.

Good luck,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Top