# Take an action during field fill

**URL:** <https://techcommunity.softwareag.com/t/take-an-action-during-field-fill/172586>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-News-and-General-Topics\
**Created:** [September 12, 2013, 9:45pm UTC](https://techcommunity.softwareag.com/t/take-an-action-during-field-fill/172586 "2013-09-12T21:45:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luanvictor](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@luanvictor](https://techcommunity.softwareag.com/u/luanvictor)\
**Post date:** [September 12, 2013, 9:45pm UTC](https://techcommunity.softwareag.com/t/take-an-action-during-field-fill/172586/1 "2013-09-12T21:45:47Z")

</div>

Hi everybody,

```
I need your help to solve a doubt about perform a action, but I don't know if Natural allows to implement this solution. The question is: There are any way to take an action during a field fill?

For example: I have a direct loop that controls a INPUT of a variable (alphanumeric). This variable represents a keyword used to search names in database (Adabas) based on its value. So I want to perform a action to realize a search while user fills the field without hitting ENTER or another *PF-KEY, then the system performs the search and brings the records that match with the value entered. It's something just like Google does when we start to type the keywords that we to search and it brings immediately the results that match with words typed by the user.

Could somebody help me?

```

Thanks for attention.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [September 12, 2013, 9:58pm UTC](https://techcommunity.softwareag.com/t/take-an-action-during-field-fill/172586/2 "2013-09-12T21:58:44Z")

</div>

Can you PLEASE post this in a relevant category (Natural General » Natural News and General Topics is definitely not where it belongs) and provide more information about the environment ?

Are we talking about Natural for Ajax here ?

---

<div class="post-metadata">

**Author:** ![luanvictor](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@luanvictor](https://techcommunity.softwareag.com/u/luanvictor)\
**Post date:** [September 12, 2013, 10:08pm UTC](https://techcommunity.softwareag.com/t/take-an-action-during-field-fill/172586/3 "2013-09-12T22:08:19Z")

</div>

I’m using Natural on Unix.

OP-System …: AIX  
NAT-Ver …: V 6.3.6.0

So, there’s a way to make something like this?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [September 13, 2013, 5:51am UTC](https://techcommunity.softwareag.com/t/take-an-action-during-field-fill/172586/4 "2013-09-13T05:51:55Z")

</div>

No, it requires the Enter or a PF-Key to be hit to trigger the INPUT,  
data / events will not be sent to the Natural program on individual key strokes.

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [September 13, 2013, 12:55pm UTC](https://techcommunity.softwareag.com/t/take-an-action-during-field-fill/172586/5 "2013-09-13T12:55:03Z")

</div>

Just to add to Wolfgang’s answer re Unix.

Natural on the PC does have “change” events, which permit what you wish to do.

Under Unix, the closest you will get to this is a “wildcard” implementation. The user enters something like ROG\* in the search field. In your Natural code, you can do an

EXAMINE “input variable” FOR ‘\*’ DELETE…GIVING NUMBER #NUM

Then, if #NUM is not zero, you can MOVE the input variable (without the asterisk because of the DELETE option) to a variable like #START.

You could then have a READ…STARTING FROM #START with appropriate code to limit the READ loop to values which start with #START.

If #NUM is zero, you would probably do a FIND with the search-field = #START.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:29pm UTC](https://techcommunity.softwareag.com/t/take-an-action-during-field-fill/172586/6 "2021-04-02T15:29:27Z")

</div>


