# clear host input

**URL:** <https://techcommunity.softwareag.com/t/clear-host-input/175146>\
**Category:** Forum\
**Tags:** Mainframe-Integration, ApplinX\
**Created:** [March 19, 2014, 11:04am UTC](https://techcommunity.softwareag.com/t/clear-host-input/175146 "2014-03-19T11:04:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Odina\_TOMA](https://avatars.discourse-cdn.com/v4/letter/o/74df32/32.png) [@Odina\_TOMA](https://techcommunity.softwareag.com/u/Odina_TOMA)\
**Post date:** [March 19, 2014, 11:04am UTC](https://techcommunity.softwareag.com/t/clear-host-input/175146/1 "2014-03-19T11:04:56Z")

</div>

Hi,

we have defined a procedure path in our applinX application which navigates from host mask A to host mask D by providing input values to different host masks.  
The problem occurs when the navigation path is executed and the target mask D is reached the user is then free to navigate trough the host masks as he wishes. When navigating trough the host masks the user might provide on the host mask C (input filed X) a certain value. When executing the navigation path the second time the input field X from host mask C preserves its value and therefore the navigation to the host mask field D can not be completed because of this wrong input.  
We would like to have a clean easy to use solution to clear all input fields of a host mask at once. In our case not all the input fields are defined as fields (protected or unprotected) in the screen C Entity. Clearing all these fields would mean that we have first to define all the host inputs on the ApplinX screen entity and map them to an empty string.

Is there a possibility to clear all host fields when mapping a certain host mask (protected, unprotected or not defined host input fields)?

br,  
Odina TOMA

---

<div class="post-metadata">

**Author:** ![Gadi](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/gadi/32/16051_2.png) [@Gadi](https://techcommunity.softwareag.com/u/Gadi)\
**Post date:** [March 20, 2014, 9:10am UTC](https://techcommunity.softwareag.com/t/clear-host-input/175146/2 "2014-03-20T09:10:21Z")

</div>

Hi Odina,

Assuming your host doesn’t have a [clear] button, and you don’t want to define all the fields as app fields and iterate on them through ApplinX - you can do this in Javascript.  
Iterate on the form, and get the input elements (I think you can use getElementsByTag or something) and then clear them.  
Once you have this function you could assign it to a keyboard action using the keyboard mappings.

Regards,  
Gadi

---

<div class="post-metadata">

**Author:** ![Odina\_TOMA](https://avatars.discourse-cdn.com/v4/letter/o/74df32/32.png) [@Odina\_TOMA](https://techcommunity.softwareag.com/u/Odina_TOMA)\
**Post date:** [March 20, 2014, 10:30am UTC](https://techcommunity.softwareag.com/t/clear-host-input/175146/3 "2014-03-20T10:30:31Z")

</div>

Hello Gadi,

I think for this particular case of ours it would be more efficient if we identify all host input fields on host mask C and add a Step to clear this input fields on the navigation path in applinX.

However I will remember your suggestion with Javascript in case we will need to extend this procedure to further host masks.

Thank you.  
Odina

---

<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:30pm UTC](https://techcommunity.softwareag.com/t/clear-host-input/175146/4 "2021-04-02T15:30:36Z")

</div>


