Skip to main content
Nintex Community Menu Bar

Can we change the Empty records text of a listview

  • May 8, 2015
  • 8 replies
  • 33 views

8 replies

Forum|alt.badge.img+4
  • May 8, 2015

Hi @r_vijaykanth

 

  As far as I know, you can't directly edit the "No items to display" message in the list view. What you can try is to add a condition and rule to hide the view and display a custom message in a label in the parent form.

 

For e.g.

1. Create a aggregate data label to count the number of rows in the label.

2. In the parent form, create a label and display your custom message.

3. During Form Initialise, set a condition to check if row count is zero.

    If yes, Hide the view and show your custom message label and if not, vice versa.

 

Hope this helps.


Albarghouthy
Forum|alt.badge.img+16

Dear,

 

Drag datalable to your list and add an expression to it with the following or just add it to the text property of the datalable:

 

<script type="text/javascript"> $(document).ready(function()
{var x = document.getElementsByClassName("grid-content-cell-wrapper"); x[0].innerHTML = 'your text'; });
</script>

wish it helps


Forum|alt.badge.img+1

Hi Mustafa,

 

Thanks for the reply, but it doesn't work.

 

Regards,

Vijay.


Albarghouthy
Forum|alt.badge.img+16

Dear,

 

I'm not sure how you applied it, here it is:

 

12882iADD1AF6DDC4F9018.png

 

Please make sure you are not missing anything


Forum|alt.badge.img+1

Thanks for the reply mustafa,

 

i tried in both ways as you mentioned.

 

i took a datalabel in the listview and copied the html into text field of the datalabel which doesn't work

 

i have this list view in a form which is opened as a subview from another form, will it make any difference?

 

Regards

Vijay.


Albarghouthy
Forum|alt.badge.img+16

Hi,

 

Well, it should work anyway,

 

let me show you exactly what I have done:

 

Go to the list view it self and drag data lable 

 

12414i511B964E0CD7A298.png

 

NOTE: sometimes it happen that the opening tag (<) get lost when you paste  it, make sure you have it 

 

let me know the results 


Forum|alt.badge.img+1
  • Rookie
  • September 25, 2018

It is working for me when I just run the View, however, when I run the form that the view is on, the default text displays.  How else can we tweak the javascript so that we can directly reference the view by name?


Albarghouthy
Forum|alt.badge.img+16
  • Scholar
  • September 28, 2018

Hi,


 


I am able to  change the text using the script below:


<script>
$(".grid-content-cell-wrapper").html('List is Empty');
</script>

Transfer the script to a data label when the form is INITIALIZED 


**Make sure you check the Literal property of the data label


 


You will need to create an event to change the text when the list is refreshed, see example below:


 


12983i8579D21F71B1FA34.png


The first transfer action is to clear the data label and the second to transfer the script again.


 


HTH