Trouble retrieving value from the repository

I hope someone can help me with a script. I am trying to retrieve a string from the repository by comparing a field I have retrieved from xml input data. I cannot get the script to work.
Script I am trying to get working is:

var myValue = Watch.ExpandString("xmlget('/request[1]/values[1]/approve[1]',Value,KeepCase,Trim)");
var repoObject = new ActiveXObject("RepositoryLib.WorkflowRepository");
var MonthFolder = repoObject.GetValue("Mailings", "Month", " jobNumber = 'myValue' ");
Watch.SetVariable("AjobNumber",myValue);
Watch.SetVariable("Amonth",MonthFolder);

myValue is returning 193062 which is correct and there is a KeySet in the repository that has 193062 as a jobNumber and should then return the value of the Month field which is 05_May_2025, but all I get is NODATA

If I substitute the ‘myValue’ in the script with ‘193062’ so removing the variable from the repoObject.GetValue the script works.

Any help would be much appreciated.

The way it is currently done is using the variable myValue as if the value passed is the string ‘myValue’. It is not seen as a variable myValue. So this:

var MonthFolder = repoObject.GetValue("Mailings","Month", " jobNumber = '"+myValue+"' ");

instead of this:

var MonthFolder = repoObject.GetValue("Mailings","Month", " jobNumber = 'myValue' ");


P.S. If you copy paste from here, make sure you revisit each single and double quotes as they tend to be switch from various format depending on the editor language Windows settings.

Thats great it now works thank you