Update drop down list dynamically - xpages - xpages

I have a form with two drop down type ahead fields. The first one works but the second one has to use different views based upon the input of the first value (actually a viewScope variable stored after the first is input). The second drop down is empty no matter what is typed into the first one. I will include the code I have for the selectItems for the second field below. I also will include the visible code to only display the second field for certain circumstances. Can you please take a look at what I have? Thanks for your help. (the views in the code are all data sources)
switch(viewScope.vsTieIn) {
case "0046":
return viewAceLkup.getColumnValues(0) + viewAceLkup.getColumnValues(1) + viewAceLkup.getColumnValues(2) + "|" + viewAceLkup.getColumnValues(0);
break;
case "0009":
return viewDIBLkup.getColumnValues(0) + viewDIBLkup.getColumnValues(1) + viewDIBLkup.getColumnValues(2) + "|" + viewDIBLkup.getColumnValues(0);
break;
case "0166":
return viewOrgillLkup.getColumnValues(0) + viewOrgillLkup.getColumnValues(1) + viewOrgillLkup.getColumnValues(2) + "|" + viewOrgillLkup.getColumnValues(0);
break;
case "0016":
return viewPPGLkup.getColumnValues(0) + viewPPGLkup.getColumnValues(1) + viewPPGLkup.getColumnValues(2) + "|" + viewPPGLkup.getColumnValues(0);
break;
case "0005":
return viewTrueValueLkup.getColumnValues(0) + viewTrueValueLkup.getColumnValues(1) + viewTrueValueLkup.getColumnValues(2) + "|" + viewTrueValueLkup.getColumnValues(0);
break;
case "0026":
return viewAllProLkup.getColumnValues(0) + viewAllProLkup.getColumnValues(1) + viewAllProLkup.getColumnValues(2) + "|" + viewAllProLkup.getColumnValues(0);
break;
}
VISIBLE CODE:
getComponent("DropShip").getValue() ||
viewScope.vsTieIn == "0046" ||
viewScope.vsTieIn == "0009" ||
viewScope.vsTieIn == "0166" ||
viewScope.vsTieIn == "0016" ||
viewScope.vsTieIn == "0005" ||
viewScope.vsTieIn == "0026";
Here is the xsp code:
<xe:djFilteringSelect
id="djFilteringSelect1"
value="#{document1.CustInput}"
ignoreCase="true"
promptMessage="Enter a Customer ID, Phone or Name"
invalidMessage="Invalid Entry - check spelling"
style="width:150px"
autoComplete="true">
<xe:this.rendered><![CDATA[#{javascript:getComponent("DropShip").getValue() ||
viewScope.vsTieIn == "0046" ||
viewScope.vsTieIn == "0009" ||
viewScope.vsTieIn == "0166" ||
viewScope.vsTieIn == "0016" ||
viewScope.vsTieIn == "0005" ||
viewScope.vsTieIn == "0026";}]]></xe:this.rendered>
<xp:selectItem
itemLabel=""
id="selectItem2">
</xp:selectItem>
<xp:selectItems id="selectItems1">
<xp:this.value><![CDATA[#{javascript:switch(viewScope.vsTieIn) {
case "0046":
return viewAceLkup.getColumnValues(0) + viewAceLkup.getColumnValues(1) + viewAceLkup.getColumnValues(2) + "|" + viewAceLkup.getColumnValues(0);
break;
case "0009":
return viewDIBLkup.getColumnValues(0) + viewDIBLkup.getColumnValues(1) + viewDIBLkup.getColumnValues(2) + "|" + viewDIBLkup.getColumnValues(0);
break;
case "0166":
return viewOrgillLkup.getColumnValues(0) + viewOrgillLkup.getColumnValues(1) + viewOrgillLkup.getColumnValues(2) + "|" + viewOrgillLkup.getColumnValues(0);
break;
case "0016":
return viewPPGLkup.getColumnValues(0) + viewPPGLkup.getColumnValues(1) + viewPPGLkup.getColumnValues(2) + "|" + viewPPGLkup.getColumnValues(0);
break;
case "0005":
return viewTrueValueLkup.getColumnValues(0) + viewTrueValueLkup.getColumnValues(1) + viewTrueValueLkup.getColumnValues(2) + "|" + viewTrueValueLkup.getColumnValues(0);
break;
case "0026":
return viewAllProLkup.getColumnValues(0) + viewAllProLkup.getColumnValues(1) + viewAllProLkup.getColumnValues(2) + "|" + viewAllProLkup.getColumnValues(0);
break;
}
}]]></xp:this.value>
</xp:selectItems>
<xp:eventHandler
event="onChange"
submit="true"
refreshMode="partial"
id="eventHandler10" refreshId="custTable">
<xe:this.action><![CDATA[#{javascript:var compID = getComponent("djFilteringSelect1").getValue();
var custDoc:NotesDocument = viewCustByID.getDocumentByKey(compID);
//Set Billing Info
document1.setValue("BillCompID", custDoc.getItemValue("CustID"));
viewScope.vsBillCompID = custDoc.getItemValue("CustID");
viewScope.vsBillFax = custDoc.getItemValue("CustFax");
//Set Shipping Info
document1.setValue("ShipCompName", custDoc.getItemValue("CustShipName"));
document1.setValue("ShipAddr1", custDoc.getItemValue("CustShipAddr1"));
document1.setValue("ShipAddr2", custDoc.getItemValue("CustShipAddr2"));
document1.setValue("ShipAddr3", custDoc.getItemValue("CustShipAddr3"));
document1.setValue("ShipCity", custDoc.getItemValue("CustShipCity"));
document1.setValue("ShipState", custDoc.getItemValue("CustShipState"));
document1.setValue("ShipZip", custDoc.getItemValue("CustShipZip"));
document1.setValue("ShipProv", custDoc.getItemValue("CustShipProv"));
document1.setValue("ShipCountry", custDoc.getItemValue("CustShipCntry"));
var a = custDoc.getItemValue("CustBillName");
var b = custDoc.getItemValue("CustBillAddr1");
var c = custDoc.getItemValue("CustBillAddr2");
var d = custDoc.getItemValue("CustBillAddr3");
var e = custDoc.getItemValue("CustBillCity");
var f = custDoc.getItemValue("CustBillState");
var g = custDoc.getItemValue("CustBillZip");
var h = custDoc.getItemValue("CustBillProv");
var i = custDoc.getItemValue("CustBillCntry");
var j = custDoc.getItemValue("CustPhone");
viewScope.a = custDoc.getItemValueString("CustBillName");
viewScope.b = custDoc.getItemValueString("CustBillAddr1");
viewScope.c = custDoc.getItemValueString("CustBillAddr2");
viewScope.d = custDoc.getItemValueString("CustBillAddr3");
viewScope.e = custDoc.getItemValueString("CustBillCity");
viewScope.f = custDoc.getItemValueString("CustBillState");
viewScope.g = custDoc.getItemValueString("CustBillZip");
viewScope.h = custDoc.getItemValueString("CustBillProv");
viewScope.i = custDoc.getItemValueString("CustBillCntry");
viewScope.j = custDoc.getItemValueString("CustPhone");
document1.setValue("BillCompInfo", a + "<br />" + b + (c ? "<br />" + c : "") + (d ? "<br />" + d : "") + "<br />" + e + ", " + f + g + (h ? "<br />" + h + " " : "") + (i ? ", " + i : "") + (j ? "<br />" + j : ""));
document1.setValue("OrderStatus", "Draft");
viewScope.vsTerms = custDoc.getItemValue("CustTerms");
viewScope.vsDiscCode = custDoc.getItemValue("CustDiscCode");
viewScope.vsTradeDisc = custDoc.getItemValue("CustTradeDisc");
viewScope.vsTieIn = custDoc.getItemValue("CustTieIn");
viewScope.vsPromoCode = custDoc.getItemValue("CustPromoGroup");
viewScope.vsPromoBypass = custDoc.getItemValue("CustPromoBypass");
document1.setValue("djFilteringSelect1", "");
getComponent("djFilteringSelect1").setValue("");
if(document1.isNewNote()) {
var vUNID = session.evaluate("#Unique").elementAt(0);
document1.setValue("OrderUNID", vUNID);
viewScope.vsOrderUNID = vUNID;
}
}]]></xe:this.action>
</xp:eventHandler>
</xe:djFilteringSelect>

Take a look here http://tc-soft.com/blog/377
Your second combo has to be refreshed by the first one. So first combo must fire partial refresh to the area of second combo.

Related

Nodejs, asny to sync

I am quite new to NodeJs and need some help regarding flow.
So, I need to change some lib as it does not work for me. I have asny call and then right a way i have sync code. The thing is that sync code starts executing before asny part return data.
asny:
xmlenc.encrypt(message, options509, function(err, result) {
console.log("error:", err)
message = result
return message;
})
sync right after asyn:
xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<" + envelopeKey + ":Envelope " +
xmlnsSoap + " " +
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
encoding +
this.wsdl.xmlnsInEnvelope + '>' +
((self.soapHeaders || self.security) ?
(
"<" + envelopeKey + ":Header>" +
(self.soapHeaders ? self.soapHeaders.join("\n") : "") +
(self.security && !self.security.postProcess ? self.security.toXML() : "") +
"</" + envelopeKey + ":Header>"
)
:
''
) +
"<" + envelopeKey + ":Body" +
(self.bodyAttributes ? self.bodyAttributes.join(' ') : '') +
(self.security && self.security.postProcess ? ' Id="_0"' : '') +
">" +
genXML() +
"</" + envelopeKey + ":Body>" +
"</" + envelopeKey + ":Envelope>";
How to solve this that the progrem with wait for asyn part to return before moving to sync part.
thank you

Cron expression with start and end time

I am trying to write an cron expression with a specific start time and end time everyday. i.e.
every minute from 10:15 to 17:35 everyday
One possible solution for this is writing 3 different cron expressions like this:
0 15-59 10 * * *
0 * 11-17 * * *
0 0-35 17 * * *
Is there any possible way to write this in one single cron expression ?
There is no other way to achieve it using single crone expression but to specify multiple crone expressions for specific startDate and endDate.
There is a slight modification in second crone expression though (highlighted one)
0 15-59 10 * * * (Every minute between 10:15 AM and 10:59 AM)
0 * 11-16 * * * (Every minute, between 11:00 AM and 04:59 PM)
0 0-35 17 * * * (Every minute between 05:00 PM and 05:35 PM)
Quartz Scheduler c#
run job between to hours
use corn mask:
ITrigger trigger_1 = TriggerBuilder.Create()
.ForJob("YOUR_JOB")
.WithIdentity("trigger_1")
.StartAt(startTime)
.WithCronSchedule("0 0/1 8-13 ? * SUN,MON,TUE,WED,SAT *")
.Build();
use Quartz Schedule:
trigger_1 = TriggerBuilder
.Create()
.ForJob("YOUR_JOB")
.WithIdentity("trigger_1")
.StartAt(startTime)
.WithDailyTimeIntervalSchedule(c => c
.OnEveryDay()
.WithIntervalInMinutes(1).WithRepeatCount(1)
.StartingDailyAt(new TimeOfDay(08, 30))
.EndingDailyAt(new TimeOfDay(12, 30))
)
.Build();
HashMap<String, String> weekday = new HashMap<>();
// String strDays ="[Monday, Friday]";
String strCalDay = "";
String startDate[] = fromDate.split("-");
String endDate[] = toDate.split("-");
weekday.put("MONDAY", "1");
weekday.put("TUESDAY", "2");
weekday.put("WEDNESDAY", "3");
weekday.put("THURSDAY", "4");
weekday.put("FRIDAY", "5");
weekday.put("SATURDAY", "6");
weekday.put("SUNDAY", "7");
strDays = strDays.replace("[", "").replace("]", "");
String strDay[] = strDays.trim().toUpperCase().split(",");
if (strDay != null && strDay.length > 0) {
for (int i = 0; i < strDay.length; i++) {
strCalDay = strCalDay + "," + weekday.get(strDay[i].trim().replace("\"", ""));
}
// System.out.println(" No of days :: "+ strCalDay);
strCalDay = strCalDay.replaceFirst(",", "");
//System.out.println(" No of days :: "+ strCalDay);
}
Calendar startCal = Calendar.getInstance(TimeZone.getDefault());
Calendar endCal = Calendar.getInstance(TimeZone.getDefault());
startCal.set(Integer.parseInt(startDate[0].toString()),
Integer.parseInt(startDate[1].toString()),
Integer.parseInt((startDate[2].toString())));
endCal.set(Integer.parseInt(endDate[0].toString()),
Integer.parseInt(endDate[1].toString()),
Integer.parseInt((endDate[2].toString())));
int yearsInBetween = endCal.get(Calendar.YEAR) - startCal.get(Calendar.YEAR);
int monthsDiff = endCal.get(Calendar.MONTH) - startCal.get(Calendar.MONTH);
long ageInMonths = yearsInBetween * 12 + monthsDiff;
System.out.println(" ageInMonths: " + ageInMonths);
if (startCal.get(Calendar.MONTH) != endCal.get(Calendar.MONTH)) {
if (ageInMonths == 3) {
Calendar middleMonth1 = (Calendar) startCal.clone();
middleMonth1.add(Calendar.MONTH, 1);
Calendar middleMonth2 = (Calendar) startCal.clone();
middleMonth2.add(Calendar.MONTH, 2);
int getFirstMMonth = middleMonth1.get(Calendar.MONTH);
int getSecMMonth = middleMonth2.get(Calendar.MONTH);
if (getFirstMMonth == 0) {
getFirstMMonth = 12;
System.out.println(" getFirstMMonth : " + getFirstMMonth);
}
if (getSecMMonth == 0) {
getSecMMonth = 12;
// System.out.println(" getSecMMonth : " +getSecMMonth );
}
exp = strTimeMin + " " + strTime + " " + startDate[2] + "-" + "31,1-31,1-31,1-" + endDate[2] + " " +
startDate[1] + "," + getFirstMMonth + "," + getSecMMonth + "," + endDate[1] + " *";
// System.out.println(" expression for month3 : " + exp);
}
if (ageInMonths == 2) {
Calendar middleMonth1 = (Calendar) startCal.clone();
middleMonth1.add(Calendar.MONTH, 1);
//System.out.println(" get middleDate month : " + middleMonth1.get(Calendar.MONTH));
int getMiddleMonth = middleMonth1.get(Calendar.MONTH);
if (getMiddleMonth == 0) {
getMiddleMonth = 12;
// System.out.println(" getMiddleMonth : " +getMiddleMonth );
}
// System.out.println(" Outside getMiddleMonth : " +getMiddleMonth );
endCal.set(Calendar.MONTH, 11);
//System.out.println(" get middleDate month 001: " + endCal.get(Calendar.MONTH));
exp = strTimeMin + " " + strTime + " " + startDate[2] + "-" + "31,1-31,1-" +
endDate[2] + " " + startDate[1] + "," +
getMiddleMonth + "," + endDate[1] + " *";
// System.out.println(" get end month2 : " + exp);
} else if (ageInMonths == 1) {
exp = strTimeMin + " " + strTime + " " + startDate[2] + "-31,1-" +
endDate[2] + " " + startDate[1] + "," + endDate[1] + " *";
//System.out.println(" expression for one month : " + exp);
}
} else {
exp = strTimeMin + " " + strTime + " " + startDate[2] + "-" + endDate[2] + " " + endDate[1] + " *";
}
System.out.println(" expression for before parameter : " + exp);
//Run with only Start Date
if (strRepeat != null && strRepeat.equalsIgnoreCase("No")) {
exp = strTimeMin + " " + strTime + " " + startDate[2] + " " + startDate[1] + " *";
} else if (strRepeat != null && strRepeat.equalsIgnoreCase("Daily")) {
exp = exp;
} else if (strRepeat != null && strRepeat.equalsIgnoreCase("Weekdays")) {
// System.out.println(" expression for weekdays before : " + exp);
exp = exp.replace("*", strCalDay);
// System.out.println(" expression for weekdays after : " + exp);
} else if (strRepeat != null && strRepeat.equalsIgnoreCase("Weekends")) {
// System.out.println(" expression for weekend before : " + exp);
exp = exp.replace("*", "6,7");
// System.out.println(" expression for weekend after : " + exp);
}
System.out.println(" cron expression ::: " + exp);

Adding multiple shapes in d3

I would like to add different shapes depending on one of the properties in my json file. I found this approach by Mike:
https://groups.google.com/forum/#!topic/d3-js/4EJDu1xOh8Y
The idea is great, I'm just not sure how to adapt it. I either want to add a circle or an svg:use element (with attr("xlink:href")). They both have (of course) different attributes. So how do I do that? What do I append? In the example, the attr("d") was also used, do I need that also?
That's what I have so far but I'm not sure what to add where.
I really appreciate your help!
var type = d3.scale.ordinal()
.domain(["Q", "C"])
.range("circle","svg:use");
for(l=0;l<4;l++){
currentsvg.selectAll("path")
.data(queryArray[l])
.enter()
.append("svg:path")
.type(function(d,i) {
if (queryArray[l][i].name.substr(0,1) == "Q"){
return type("Q");
}
else if (queryArray[l][i].name.substr(0,1) == "C"){
return type("C");
}
});
}
Below is a different solution without filtering that uses the path to draw the shapes. It doesn't use the "rect" or "circle" of svg but rather just uses the path to draw the shapes. Check out here for more on paths. Note that the circle is two connecting arcs. It also classes each shape based on the data so you can have different colors, etc using CSS. Here is a fiddle.
currentsvg.selectAll("path")
.data(data)
.enter()
.append("path")
.attr("d",function(d,i){
var path,
s = i*50,
r = 10,
w = r*2;
if (data[i] == "Q"){
path = "M" + s + " " + s + " L" + s + " " + (s+w) +
" L" + (s+w) + " " + (s+w) + " L" + (s+w) + " " + s + "Z"
}
else if (data[i] == "C"){
path = "M" + s + " " + s + " m" + -r + ", 0 " +
" a " + r + "," + r + " 0 1,0 " + r*2 + ",0" +
" a " + r + "," + r + " 0 1,0 "+ -r*2 + ",0"
}
return path;
})
.attr("class", function(d){return d == "Q" ? "rec" : "circ";})
The best way to do that is to filter the data how you want into separate data sets for each shape before you create shapes. Then you can create the shapes with that new data set.
var data = ["Q","Q","Q","C","C","Q","Q","C","Q","C"];
var circleSet = data.filter(function(d){return d === "Q";}),
squareSet = data.filter(function(d){return d === "C";});
As Lars said, that is also not how the d attribute works. Here is a working JSFiddle of the whole thing.

Javascript: Error in String Concatenation

So I have this javascript function:
function show_courseline (course_index, repeats) {
var s = "";
var count = 0;
while (count < repeats) {
s = s + 'Number: ' + document.getElementById(course_index + count + 'a').innerHTML + '\n' +
'Semester: ' + document.getElementById(course_index + count + 'b').innerHTML + '\n' +
'Year: ' + document.getElementById(course_index + count + 'c').innerHTML + '\n' +
'Title: ' + document.getElementById(course_index + count + 'd').innerHTML + '\n' +
'Units: ' + document.getElementById(course_index + count + 'e').innerHTML + '\n' +
'Description: ' + document.getElementById(course_index + count + 'f').innerHTML + '\n';
++count;
}
alert(s);
}
But I get an error when I run it through an "onclick" input box. It has nothing to do with the document ids not being there, because they are.
Is course_index integer? If it is course_index + count is an integer and I know that ids cannot start with a digit

FTSearch involving date fields is confusing me

I have Custom Control with a search screen that lets the users select any of up to six different fields to search on. I had no trouble getting all the other fields working with the exception of the two date fields. They can fill in both begin and end dates or just one or the other. Pretty standard stuff but I cannot figure out how to write the code to make the query work and have it do the search when it involves dates.
var tmpArray = new Array("");
var cTerms = 0;
if(requestScope.cmbSendTo != null & requestScope.cmbSendTo != "") {
a = #Right(requestScope.cmbSendTo, "(");
b = #Left(a,3);
tmpArray[cTerms++] = "(FIELD Mnemonic = \"" + b + "\")";
}
if(requestScope.edtFrom != & requestScope.edtFrom != "") {
tmpArray[cTerms++] = "(FIELD From = \"" + requestScope.edtFrom + "\")";
}
//**************************************************************************
if(requestScope.edtDateRangeFrom != null & requestScope.edtDateRangeFrom != "") {
tmpArray[cTerms++] = "(FIELD DeliveredDate >= \"" + requestScope.edtDateRangeFrom + "\")";
}
if(requestScope.edtDateRangeTo != null & requestScope.edtDateRangeTo != "") {
tmpArray[cTerms++] = "(FIELD DeliveredDate <= \"" + requestScope.edtDateRangeTo + "\")";
}
//**************************************************************************
if(requestScope.edtOriginal != null & requestScope.edtOriginal != "") {
tmpArray[cTerms++] = "(FIELD SourceFilename = \"" + requestScope.edtOriginal + "\")";
}
if(requestScope.edtCaptiva != null & requestScope.edtCaptiva != "") {
tmpArray[cTerms++] = "(FIELD Filename = \"" + requestScope.edtCaptiva + "\")";
}
qstring = tmpArray.join(" AND ").trim();
requestScope.queryString = qstring;
return qstring
Any assistance would be appreciated
The idea behind this screen was taken from this video:
XPages View Control - Add Full Text Search - http://www-10.lotus.com/ldd/ddwiki.nsf/dx/XPagesViewControlAddFullTextSearch.htm
The line if(requestScope.edtFrom != & requestScope.edtFrom != "") { is not complete. You miss the part to test for. I assume it lacks the null check and therefore should be:
if(requestScope.edtFrom != null & requestScope.edtFrom != "") {
Furthermore, you need to format the date to return what you expect for the query (e.g. MM/dd/yyyy). The formatting in the inputText control only applies to the visual formatting and not the format of the actual content.
Finally, you need to remove the quotes around the date.
The following code example based on your code will return the date without formatting and then return the date with the correct formatting:
<xp:button value="Label" id="button1">
<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="computedField1"></xp:eventHandler>
</xp:button>
<xp:inputText id="edtDateRangeFrom" value="#{requestScope.edtDateRangeFrom}">
<xp:this.converter>
<xp:convertDateTime type="date"></xp:convertDateTime>
</xp:this.converter>
<xp:dateTimeHelper></xp:dateTimeHelper>
</xp:inputText>
<xp:text escape="true" id="computedField1">
<xp:this.value><![CDATA[#{javascript:var tmpArray = new Array("");
var cTerms = 0;
if(requestScope.edtDateRangeFrom != null & requestScope.edtDateRangeFrom != "") {
tmpArray[cTerms++] = "(FIELD DeliveredDate >= \"" + requestScope.edtDateRangeFrom + "\")";
var dateFormatter = new java.text.SimpleDateFormat( "MM/dd/yyyy" );
var formattedDate = dateFormatter.format( requestScope.edtDateRangeFrom );
tmpArray[cTerms++] = "(FIELD DeliveredDate >= " + formattedDate + ")";
}
qstring = tmpArray.join(" AND ").trim();
requestScope.queryString = qstring;
return qstring}]]>
</xp:this.value>
</xp:text>
It will return the following where the 2nd part is the format you are looking for:
(FIELD DeliveredDate >= "Fri Apr 27 12:00:00 CEST 2012")
AND (FIELD DeliveredDate >= 04/27/2012)
Here is your code with all these updates:
var tmpArray = new Array("");
var cTerms = 0;
var dateFormatter = new java.text.SimpleDateFormat( "MM/dd/yyyy" );
var formattedDate = "";
if(requestScope.cmbSendTo != null & requestScope.cmbSendTo != "") {
a = #Right(requestScope.cmbSendTo, "(");
b = #Left(a,3);
tmpArray[cTerms++] = "(FIELD Mnemonic = \"" + b + "\")";
}
if(requestScope.edtFrom != null & requestScope.edtFrom != "") {
tmpArray[cTerms++] = "(FIELD From = \"" + requestScope.edtFrom + "\")";
}
if(requestScope.edtDateRangeFrom != null & requestScope.edtDateRangeFrom != "") {
formattedDate = dateFormatter.format( requestScope.edtDateRangeFrom );
tmpArray[cTerms++] = "(FIELD DeliveredDate >= " + formattedDate + ")";
}
if(requestScope.edtDateRangeTo != null & requestScope.edtDateRangeTo != "") {
formattedDate = dateFormatter.format( requestScope.edtDateRangeTo );
tmpArray[cTerms++] = "(FIELD DeliveredDate <= " + formattedDate + ")";
}
if(requestScope.edtOriginal != null & requestScope.edtOriginal != "") {
tmpArray[cTerms++] = "(FIELD SourceFilename = \"" + requestScope.edtOriginal + "\")";
}
if(requestScope.edtCaptiva != null & requestScope.edtCaptiva != "") {
tmpArray[cTerms++] = "(FIELD Filename = \"" + requestScope.edtCaptiva + "\")";
}
qstring = tmpArray.join(" AND ").trim();
requestScope.queryString = qstring; // this just displays the query
return qstring // this is what sets the search property
If I'm reading it right, your query is resolving to
FIELD DeliveredDate >= "xx/yy/zz"
My first instinct was that you needed this instead:
FIELD DeliveredDate >= [xx/yy/zz]
But documentation indicates that you don't need brackets or quotes, so this:
FIELD DeliveredDate >= xx/yy/zz
Double check the query being created here. Perhaps print it to the screen or grab it from the debugger. You may see a problem there within the query and I believe you should be able to take that exact query and paste it in the search window of the database that has been full text indexed.
Also, have a look at this doc which covers notes query syntax, it may help you troubleshoot. I didn't see anything wrong in your code though.
http://www.loganmachinists.com/help/help8_client.nsf/f4b82fbb75e942a6852566ac0037f284/0e044d2c0639c979852572fe00687f29?OpenDocument
dates should always ( in my experience ) be written in the format mm/dd/yyyy so for instance
[deliverdatemin] >= 1/1/2012 and [deliverdatemax] <= 1/30/2012
An easy way to find out which query you are generating is to use the following piece of code to throw an error with the query generated
//youre own code
throw new java.lang.exception(queryvariable);
Or you could simply do a print() to display the query on the serverconsole
As of my concern The best way to handle the date field is that converting our date value for one specific format using NotesDateTime., Because this is the best date conversion for xpage.
Dim dateTime As New NotesDateTime( "date String" )
or
Dim dateTime As New NotesDateTime( NotedateTime.getDtaeOnly() )

Resources