SearchField to avoid empty entries

0
hi, i have a datagrid with a column containing text. Some entries are empty i don’t want to show rows with this empty cells because sorting brings me always empty first. I tried to set a comparison search field with a default character. So if the user deletes this char (field is blank) and starts the search all empty rows shouldn’t be shown. But nothing happens ..   Perhaps there is a better way of avoiding those empty rows by click (xpath??)   Thanks for every idea..  
asked
2 answers
0

If you want to show only objects with the VEMID filled you can indeed use a xpath for that.

 

Select on your datagrid the tab datasource and select xpath and use the xpath constraint:

[VEMID != empty and VEMID != '']

 

This will filter out all objects with that specific attribute empty or '’.

 

Since it's a ID field I wonder if this field suppose to be empty at all? If not then try to validate your data accordingly before you commit it so the user can never commit a object with this field empty.

 

You might want to delete or add ID's to the objects that are having this attribute empty. Then you can create a microflow where you retrieve from database and use the same xpath. Then you can chose to remove those objects by simply deleting them or use a loop to enter a valid value.

 

[EDIT] If you want to show the empty values but only not when you used the search. Then consider using Datagrid2 there you can set an onchange microflow on the search filter where you do a retrieve with the same constraint to filter the list in combination with the search query. Datagrid2 offers some options that Datagrid won't offer but that's also the way around so weight your option if you want to use this widget.

answered
0

Hi,

ok i will give DataGrid2 a chance..

Thanks again for your help!

answered