Skip to main content

Search

Check Rows

Comments

7 comments

  • Christof Nussbaumer

    Hi Nicole

     

    Just made some tests for this case. For me it works without any errors even with empty lists. What error message did you get?

    Good to know and to check: @Site.GetValuesForQuery function is looking for lists with this name in root site if you just use list's name instead of list's url.

     

    0
  • Nicole Geier

    Hi Christof Nussbaumer,

     

    I got the following error

     

    If insert the Url like you say I got the following message

     

    But the url exists. What is wrong?

     

    Kind regards

    Nicole

    0
  • Christof Nussbaumer

    Hi Nicole Geier

     

    If the List Parents is not in the root site of your site collection you have to use the URL.

    In your list URL example you missed the starting / ( forward slash).

    This is probably the issue.

    0
  • Nicole Geier

    hi Christof Nussbaumer

     

    I have insert the URL starting with ( forward slash), I have insert the complete list URL and it doesn't work.

    I get always the error that "does not exist at site with URL".

    It only recognize the list if I insert only the listname (in my case 'Parents)'.

    My list is in this site collection but not in the root.

     

    Sorry I have no idea why I don't work in this part of the action links (1.3.7.4)

     

    Kind regards

    Nicole

    0
  • Nicole Geier

    Remark that in richform it work as you described but not in Action Links

    0
  • Christof Nussbaumer

    Hi Nicole Geier

     

    Could now reproduce the use case you asked for. You do it right when you just use the Listnames as first parameter.

     

    It's true, the property length is not available when the Query List function returns no items.


     

    Therefore you have to handle this case by checking first the returned result.

     

    This is how this check looks like:

    Switch to Function code and use this check with your query list configuration.

    var items = [[@Web.GetValuesForQuery('Employee', '<Where></Where>', 'ID')]];
    if(items) {
         return items.length < 2;
    }
    return true;

     

    This returns true if there are no items returned. If items are returned it checks amount agains smaller than 2.

    0
  • Nicole Geier

    Hi Christof Nussbaumer

    thank you this helped me.

     

    Kind regards

    Nicole

    0

Please sign in to leave a comment.