Using Variables within Query List

  • 9 December 2018
  • 4 replies
  • 4 views

Badge +4

Hi All,

I have a workflow that uses the 'Create item' to make a new document and save it to a specific Document Library. I then want to use the URL Path of this new document in another part of the workflow so after 'Create item' I use 'Query List' to filter out the new document and then save the URL Path as a variable.

The document name is 'Programme Board Agenda - Dec 18' (the Dec 18 is a variable asked on the start form which naturally changes between months). Therefore, no two documents will have the same name.

When it comes to the 'Query List', I use the following filters on it to pick out the specific document:

The 'Programme Board Month' is the variable asked at the start from of the workflow, it is always in the format 'MON YYYY' (e.g Dec 2018). This then saves the 'URL Path' in another variable.

However, at this point it doesn't save it within the new variable. It just remains blank. I've found this out by adding the 'Log in history list' workflow action after the query list but it doesn't seem to show up.

Is anyone able to advise on this? I have done it successfully on another workflow on another site without any issues. Although the circumstances are different I can't see what I'm doing wrong. Also, if I were to take out the 'Programme Board Month' variable and type in a month and year in the above format it works fine.

I understand there is the CAML editor which could be used but I don't have too much experience in this.

Any help/suggestions in this would be really appreciated!

Thanks in advanced.

Harry


4 replies

Badge +10

Did you try printing (log history) the variable "Programme Board Month", see if the variable is having the correct data.

Badge +16

As discussed, you can just build this url as opposed to querying the list.

Badge +4

I have tried that, and it seems to show up fine when it's just the variable.

Badge +4

As Cassy kindly suggested, I've decided to use the 'build string' to create the URL instead of using 'Query list'.

Reply