Event Rules when ENTERING a grid column

  • Thread starter Frosty the Coder
  • Start date

Frosty the Coder

Legendary Poster
List -

I have a headerless detail, w/one GC being "WHO1".

I have overridden this column to use "Who's Who Search/Select" as the visual assist.

The client has decided that this column should NOT be input capable,
but only populate from the Visual Assist, as people are keying values NOT found in Who's Who.

If I "disable input", I lose the visual assist.

If I mark the column as "Clickable" (in properties), it automagically checks "disable input".
Adding ER to the event "Grid Column is Clicked" executes ONLY if you click on the column.
If you TAB into it, this event doesn't execute.

There is no "Column is Entered" Event.

I realize that I can edit it after the fact, comparing against, and prompting for Who's Who,
but they don't want to key AT ALL in this column.

Is there a way to disable the GC from input, keep the VA,
and prompt for the VA when they ENTER the column?

TIA

Gene
 
I have, in the past, disabled the grid field and added a Hyper-exit which exits to the search and select VA and upon return pops the value into the grid field.

Ben again,
 
They'd have to press the hyper-exit for this to work, correct?
To them, that's "unacceptable".
They have taken the term "USER" to a new level.....
 
Then give it a hot key, like Alt-1 the '1' isn't that far from the Tab key. As an added feature, they can get there anytime without having to worry about where their cursor is in the grid.........

Ben again,
 
Hiya Gene!

Here's another option:

1) Go into the properties of your grid column (WHO1). Select CLICKABLE (which is really for web stuff but, just bear with me).
2) Go into the ER for the grid column WHO1 and, in the Grid Column Clicked event put in a form interconnect call to the Who's Who Search & Select program (P0111S). Make sure you have the GC column in the form interconnect so the value you select in P0111S comes back to the grid.

You'll have to play with the interconnect values a little bit but, It works fairly well. The only problem is your users will have to put up with that silly little pointing finger icon whenever they hover over the WHO1 column.

Good luck!
 
I tried that but found that you had to click on the gc.
I have to exhaust every possibility before making them do any "work" (ie "clicking").
"Clicking" only works as an absolute last resort....
 
Ok.

How about doing a simple table I/O (fetch or select) on F0111 (or an existing/custom view) on the WHO1 column exited/changed inline event? It's unimaginative but, effective :)

So, you've got the Who's Who Search and Select attached (via the GC overrides) and, you're now able to validate what the user input into the column via the table I/O. Cool?!?
 
How about turning this on it's face.
Instead of trying to trigger an event when entering your column, trigger the event on exiting the previous column.
This will give the users what they want during standard grid entry.
However, if they click on that field, then they will have to manually press the visual assist.
But since, from the discussion, they don't want to "click", they should be tabbing between grid columns, so this method should work.

Hope that helps,



Peter Hamilton
Xe/B9, Windows NT, AS400
 
Hi Gene, Ben,

Mi first idea was something like Ben's.

You can do this hot key solution with a hidden push button. User won't see that, so it won't hurt THE USER's click phobia.

Regards,

Zoltán
 
Hi Gene,

Here is a bit crazy solution.

Disable your WHO1 column.
Place a short dummy column before (or after) WHO1, based on any Data Item, without NextNumbering, Editing, etc. or disable these on the properties sheet.
Place your Visual Assist logic onto this column, but working with the data in WHO1.

You can select any form to override Visual Assist, making available the Visual Assist button ("Crashing Rocket" :) for this column.

In the Visual Assist Button Clicked event you can Suppress Default Visual Assist" via System Function call and can enter your logic, working with WHO1.

Could be usefull to clear the contents of this dummy field in the mentioned event and in the Col Exited event too.

Other little trick could be, to set the font color with Set Grid Font system funtion to the same, as the background color (white). This will prevent to see anything in this short field, when he keys something here accidentally.

Please, let us know anyway, how you handled this issuee finally.

Just a sort question: is it a custom object or a modified original OW appl?

Regards,

Zoltán
 
I must be missing something here. Why can't you just attach the visual assist (P0111S) to the WHO1 GC and then validate the WHO1 GC value via a Table I/O to F0111 on Column exited/changed inline?
 
Hi Gene again,

First some quiestion:

1.) How the user press the Visual Assist? With Mouse Click?
2.) Is there any shortcut key to press the Visual Assist? (I have not found)
3.) What is the User's real needs? e.g.: They prefer to use the keyboard instead of mouse? They do not want to see the invalid value error message?
4.) Where is WHO1 validated? This DD item hasn't Edit Rule by default.
5.) Is the blank enry valid for WHO1 on the affected form?

Now some additinal crazy hint:

A.) If user want to use the keyboard, instead of mouse, then:

Place a dummy column with white coloured font and without any special handling (e.g. Edit or Display Rule, Next Numbering, Visual Assist, etc.) before WHO1.

If the user keyed anything in the column, then call the Search&Select for WHO1 in the Col Exited or Col Exited and Changed - In-line event AND clear the contents of the dummy column.

B.) If the user just do not want to see the error message on invalid entry, then:

- enable the input for WHO1 with your Visual Assist
- in the Col Exited or Col Exited and Changed - In-line even:
-- validate WHO1 but do not set error
-- if the value is invalid, call the Search&Select for WHO1
-- if WHO1 is still invalid (namely it does not changed) then:
--- blank out the field (if blank is valid)
--- OR call Search&Select in a loop, while the entry is invalid

Regards,

Zoltán
 
Hi Michael,

Maybe I misunderstood something.

I supposed, Gene's problem is not, that how to override Vusal Assist or how to validate the value.

As I understood, the problem is the User's need:

- They do not want use the mouse
_OR_
- They do not want to see error message when the keyed entry is invalid (while valid entry is required)
_OR_
- both together

I hope, Gene will clarify their issue soon.

Regards,

Zoltán
 
Re: RE: Event Rules when ENTERING a grid column

If they were to set USER OVERRIDES, and change the columns sequence, I don't know that it would work.
 
Zoltan, Number 2, the short cut for visual assist is CTRL F10. I'll just keep reading the rest of the thread.
 
Re: RE: Event Rules when ENTERING a grid column

Does this need to work with HTML? And, how averse to going way deep into the JDE C API are you? We can always be creative, like with Zoltan's 'press ok' caper.
 
List -

First, and foremost, the Apps person already said "GOOD ENOUGH" to my solution.

Now the sordid history of this.

The requirement was to have a custom "contacts" table, linked to orders.
Each "contact" was to have a "type", be valid AB, and have a "contact name" (who1).
There can be multiple contacts w/in AB#, w/in type, w/in KCOO/DOCO/DCTO.
The contacts were to be selected from the Who's Who for the AB#.

Table is:
(key) KCOO, DOCO, DCTO
(key) KY (validated against udc 01/01)
(key) AN8 (validated against F0101)
(key) USEQ
(nonkey) WHO1.

I banged off the table/appl a bit (16 mm) ago.
It was working FINE until someone noted that WHO1
was allowing them to key names NOT on Who's Who.

They want that a value is non-blank AND in Who's Who.
When I disabled the WHO1 column, the VA (set to Who's Who) went away.
They DON'T want to click ANYWHERE/ANYTIME (too much effort).
They WANTED that Who's Who would display as soon as you enter the column.

What I ended up doing was:
Disable the GC, remove the "required entry field" override.
At GC Exited AND Row Exited-Changed Inline I look if AB# > 0.
If so, if GC WHO1 <= blank, I interconnect to Who's Who.

I already had code on GC AB#, exited & changed, to interconnect & fill the value,
but they could still key over it (which is what I want to prevent).

So, if they key an AB, don't select a contact, and tab through the (input disabled) WHO1,
and WHO1 is blank, Who's Who is displayed.

If they key an AB, don't select a contact, and row exit (press OK), Who's Who is displayed.

I've also added a row exit for "change contact".

Granted, they don't get it when ENTERING the column (which is what started this thread),
but they're going to have to get over it.

I appreciate all the replies/suggestions, and if "good enough" doesn't hold, I'll be looking at them again.

Thanks (again)

Gene
 
Re: RE: Event Rules when ENTERING a grid column

Yes, HTML is in the mix.
Hopefully, the code I have works.
I need to wait for a pkg/e-gen/bounce to test.

As far as "C", I can spell it (sometimes).
(I'm an old-WORLD dog, playing in OW since 7.3.2,
still learning OW (XE? E1? whatEVER) tricks....)

Thanks (again & again & again).

Gene
 
Back
Top