Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
User Experience
Lawson Design Studio
Getting the row field value corresponding to invoice
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Chris Radcliffe
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5187
People Online:
Visitors:
327
Members:
0
Total:
327
Online Now:
New Topics
S3 Customization/Development
Cobol - Extract Current Time
4/24/2024 7:21 PM
How do you extract just the Current System Time in
Lawson Landmark
LPL INSTR Functions
4/5/2024 8:32 PM
I'm writing a simple report using the Create R
Infor SCM
Translating 856 to get the ~ REF^CN^ field
4/3/2024 8:24 PM
We are trying to get the tracking number which is
IPA/ProcessFlow
Sample XML file create Flow
4/3/2024 3:43 PM
Hello everyone, I am new to creating XML files
Lawson S3 HR/Payroll/Benefits
bn105 error message
3/26/2024 6:40 PM
I need to change some of the set ups in our Life I
IPA/ProcessFlow
IPA executing Job
3/13/2024 7:08 PM
New to the IPA world and was wondering, can an IPA
Lawson S3 HR/Payroll/Benefits
Life Age Reduction on benefits plans
3/12/2024 7:15 PM
For our optional life we have an age based coverag
Lawson S3 HR/Payroll/Benefits
BN53.1 Add-In
3/7/2024 3:31 PM
We are migrating to Solstice. They require a
Lawson Business Intelligence/Reporting/Crystal
Domain Name Change
3/5/2024 7:45 PM
Our domain name needs to change and was hoping I c
S3 Customization/Development
Cobol calling Shell Script
2/29/2024 1:27 PM
Has anyone created or modified a Lawson Cobol prog
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3288
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1351
Roger French
1311
mark.cook
1244
Forums
Unanswered
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Lawson Design Studio
Getting the row field value corresponding to invoice
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
Subic
Basic Member
Posts: 7
10/18/2010 2:35 PM
Hi,
I am trying to get the value from each row that is corresponding to invoices.I have tried using button and image link. but both are not working.
Button option
when I click first button, getting the correct value from line1. but when i click the second row button, still getting row1 value.
Image option using the field id.
when click line 1 image, getting value from the last row values. Because, each row, we are comparing all line with same value.
My sample code is here.
if(lawForm.getElementValue("_f67r0",row)=="D")
{
url="";
url = "http://abc:8080/ImageSearchServlet";
url = url + "?frmVdrNbr="+lawForm.getDataValue("VENDOR");
url = url + "&frmInvNbr="+lawForm.getElementValue("_f54r0");
url = url + "&frmIPrntNbr="+lawForm.getElementValue("_f61r0");
url = url + "&fileOptions=true&printOptions=true";
var winValue = window.open(url,"File",'resizable=yes,scrollbars=no,toolbar=no,directories=no,status=yes,menubar=no,copyhistory=no');
}
if(lawForm.getElementValue("_f67r1",row)=="D")
{
url="";
url = "http://abc:8080/ImageSearchServlet";
url = url + "?frmVdrNbr="+lawForm.getDataValue("API-VENDOR");
url = url + "&frmInvNbr="+lawForm.getElementValue("_f54r1");
url = url + "&frmIPrntNbr="+lawForm.getElementValue("_f61r1");
url = url + "&fileOptions=true&printOptions=true";
var winValue = window.open(url,"file",'resizable=yes,scrollbars=no,toolbar=no,directories=no,status=yes,menubar=no,copyhistory=no');
}
if(lawForm.getElementValue("_f67r2",row)=="D")
{
url="";
url = "http://abc:8080/ImageSearchServlet";
url = url + "?frmVdrNbr="+lawForm.getDataValue("API-VENDOR");
url = url + "&frmInvNbr="+lawForm.getElementValue("_f54r2");
url = url + "&frmIPrntNbr="+lawForm.getElementValue("_f61r2");
url = url + "&fileOptions=true&printOptions=true";
var winValue = window.open(url,"file",'resizable=yes,scrollbars=no,toolbar=no,directories=no,status=yes,menubar=no,copyhistory=no');
}
Please suggest me, if anyone have another idea.
TracyO
Veteran Member
Posts: 97
10/18/2010 2:46 PM
WHich form are you doing this on? Here is the code we have to pull up an image from AP90.1
var rowSelected = 0;
function grabAllFormValues()
{
Company = lawForm.getFormValue("text1", 0);
if (Company == '')
{
alert("Cannot display image without a valid company value on the form.");
exit;
}
Vendor = lawForm.getFormValue("text3", 0);
if (Vendor == '')
{
alert("Cannot display image without a valid vendor value on the form.");
exit;
}
while (Vendor.charAt(0)==" ")
{
var VendorLength=Vendor.length;
Vendor = Vendor.slice(1,VendorLength);
}
Invoice = lawForm.getFormValue("out8", rowSelected);
while (Invoice.charAt(0)==" ")
{
var InvoiceLength=Invoice.length;
Invoice = Invoice.slice(1,InvoiceLength);
}
if (Invoice == '')
{
alert("Cannot display image without a valid invoice value on the form.");
exit;
}
Drawer = lawForm.getFormValue("select1", rowSelected);
while (Drawer.charAt(0)==" ")
{
var DrawerLength=Drawer.length;
Drawer = Drawer.slice(1,DrawerLength);
}
if (Drawer == '')
{
alert("Cannot display image without a valid drawer value on the form.");
exit;
}
}
function DisplayImageWeb()
{
grabAllFormValues();
if (Drawer == "PETRO")
{
Drawer = "Petro" + "leum";
imgAddress = "http://inow:8080/webnow/index.jsp?action=document";
imgAddress = imgAddress + "&drawer=" + Drawer;
imgAddress = imgAddress + "&folder=";
imgAddress = imgAddress + "&tab=";
imgAddress = imgAddress + "&field3=" + Vendor;
imgAddress = imgAddress + "&field4=" + Invoice;
imgAddress = imgAddress + "&viewname=Petroleum";
imgAddress = imgAddress + "&displaysearchwindow=true";
}
if (Drawer == "AP")
{
imgAddress = "http://inow:8080/webnow/index.jsp?action=document";
imgAddress = imgAddress + "&drawer=" + Drawer;
imgAddress = imgAddress + "&folder=" + Vendor;
imgAddress = imgAddress + "&tab=" + Invoice;
imgAddress = imgAddress + "&viewname=All Documents";
imgAddress = imgAddress + "&displaysearchwindow=true";
}
imgWindow=window.open(imgAddress,"invoiceWindow","location=yes,menubar=no,resizable=yes,scrollbars=yes,titlebar=yes,toolbar=no");
imgWindow.focus();
return true;
}
function BUTTON_OnClick(id, row)
{
//alert(id + ", " + row);
rowSelected = row;
return true;
}
Subic
Basic Member
Posts: 7
10/18/2010 3:04 PM
Tracy,
I have tried button on click option.
Always, I am getting push8,-1 value for all rows. Here is the code.
function BUTTON_OnClick(id, row)
{
if (id != "push8") {
return true;
}
alert(id+","+row);
var url = "http://abc:8080/ImageSearchServlet"
url = url + "?frmVdrNbr=" + lawForm.getDataValue("API-VENDOR");
url = url + "&frmInvNbr=" + trimText(lawForm.getFormValue("out12",rowSelected));
url = url + "&frmIPrntNbr=" + trimText(lawForm.getFormValue("out16",rowSelected));
url = url + "&fileOptions=true&printOptions=true";
alert(url);
var winValue = window.open(url,"File",'resizable=yes,scrollbars=no,toolbar=no,directories=no,status=yes,menubar=no,copyhistory=no');
}
David Williams
Veteran Member
Posts: 1127
10/18/2010 3:21 PM
Subic - I answered your comment from my blog - did you get a chance to see it?
Subic
Basic Member
Posts: 7
10/18/2010 3:36 PM
Dave,
No. I haven't looked yet. Let me check that. Thank you.
Subic
Basic Member
Posts: 7
10/18/2010 6:20 PM
Dave,
I have looked your comment and replied on your blog.
I don't have any drop down to get the row id. Suggest me for any other idea.
David Williams
Veteran Member
Posts: 1127
10/18/2010 8:27 PM
You can add an extra drop down select value to the FC and if you use that (like in my sample on my blog) then the script will work.
Subic
Basic Member
Posts: 7
10/18/2010 8:33 PM
Dave,
Are you saying, add a drop down to each invoice row for getting the row info?.
Subic
Basic Member
Posts: 7
10/19/2010 3:44 PM
Anyone have another idea?.
isln_boy
Basic Member
Posts: 8
10/19/2010 5:01 PM
For the button option, I was getting the same response as you were, always returning the the first row value. I fixed the problem by manually adding "r0" to the end of nbr variable for the button in the source.
Changed this
push id="push3" nbr="_l80"
to
push id="push3" nbr="_l80r0"
TracyO
Veteran Member
Posts: 97
10/19/2010 5:50 PM
I remembered now that we had to go to the source page in DS to make it read the line we wanted. We had to change the actual Source to display the field for nbr:
I believe before we changed the source it read: nbr = ""
then we changed it to: nbr="_l72ro" (where l72 is the button I created.
Hope this helps
TracyO
Veteran Member
Posts: 97
10/19/2010 5:51 PM
the code did not come thru. try this again: You should find the line in the source a few lines above where the java script code starts to display
Subic
Basic Member
Posts: 7
10/19/2010 6:22 PM
Yes. It is working, after changing the nbr field from "_67" to "_67r0". Thank you all.
Ragu Raghavan
Veteran Member
Posts: 469
10/12/2011 12:05 AM
Thank you all. This helped me today.
You are not authorized to post a reply.