# Key Fields with no Value

**URL:** <https://techcommunity.softwareag.com/t/key-fields-with-no-value/185414>\
**Category:** Forum\
**Tags:** Mainframe-Integration, ApplinX\
**Created:** [November 30, 2015, 8:39pm UTC](https://techcommunity.softwareag.com/t/key-fields-with-no-value/185414 "2015-11-30T20:39:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeA](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@JoeA](https://techcommunity.softwareag.com/u/JoeA)\
**Post date:** [November 30, 2015, 8:39pm UTC](https://techcommunity.softwareag.com/t/key-fields-with-no-value/185414/1 "2015-11-30T20:39:27Z")

</div>

One of our Developers has a query:

We have a map with multiple screens. The key fields are in the 1st screen’s table.  
If we check In the 1st screen “filter duplicate rows”, then all data from the 2nd & 3rd screens is missing.

So, only way (I know) to specify key fields and set filters is in the corresponding java:

```
            //Adding primary keys to gx_table
                            GXITableColumn[] columns = {gx_tbl.getColumns().getColumn("Chain_Name"),
                                            gx_tbl.getColumns().getColumn("Chain_Id")};
                                            gx_tbl.setPrimaryKey(columns);

```

and

//Set filter on the rows which will remove all the empty rows from the table  
gx\_tbl.getRows().addFilter( new GXNonEmptyRowsFilter(gx\_tbl.getPrimaryKey()));gx\_tbl.getRows().filterRows();

//Set filter on the rows which will remove all the duplicate rows from the table  
gx\_tbl.getRows().addFilter( new GXNonDuplicateRowsFilter());gx\_tbl.getRows().filterRows();

The problem is that on the total line, a key field, Chain\_Id is blank & the line is not shown at all.  
In order to show this line we have to change the Natural program to populate this field.

Is there a better solution to show a line where one of the key fields is blank?

---

<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:** [December 1, 2015, 10:18am UTC](https://techcommunity.softwareag.com/t/key-fields-with-no-value/185414/2 "2015-12-01T10:18:25Z")

</div>

Can you send some screenshots and a GCT file with the table?

---

<div class="post-metadata">

**Author:** ![JoeA](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@JoeA](https://techcommunity.softwareag.com/u/JoeA)\
**Post date:** [December 4, 2015, 10:01pm UTC](https://techcommunity.softwareag.com/t/key-fields-with-no-value/185414/3 "2015-12-04T22:01:59Z")

</div>

Never mind. The Developer went another way.

---

<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:34pm UTC](https://techcommunity.softwareag.com/t/key-fields-with-no-value/185414/4 "2021-04-02T15:34:47Z")

</div>


