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
Java Script Looping
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:
303
Members:
0
Total:
303
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
Java Script Looping
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
Eddie Smith
Advanced Member
Posts: 39
5/26/2010 2:18 PM
I'm new to using Design Studio and trying to make an IC user field a required field on the IC21.1 form (Inventory Issue screen). I'm able to get the script to check the first line on the detail section, but how do you get it to check all lines having an item being issued out? Below is my JAVA script. Any help would be appreciated.
function FORM_OnBeforeTransaction(fc)
{
if (fc == "A" || fc == "C")
{
var sUserFld = lawForm.getFormValue("text22");
if (sUserFld == "")
{
lawForm.positionInFieldById("text22");
alert("Badge ID is required")
return false
}
}
return true;
}
Gary Davies
Veteran Member
Posts: 248
5/26/2010 2:27 PM
Need to do a for loop for the number of detail lines and reference the field as such:
for (var i=0.......
var UserFld = lawForm.getFormValue("text22",i);
....
David Williams
Veteran Member
Posts: 1127
5/26/2010 2:30 PM
Check my blog for a couple of ideas:
http://consultdavidw.blog...t-line-solution.html
http://consultdavidw.blog...line-solution-2.html
Eddie Smith
Advanced Member
Posts: 39
5/26/2010 2:41 PM
Thanks Gary for the quick response. But when I add you code to my, it does not check the user field. I must be placing the code in the wrong section. Where should I insert your code?
Gary Davies
Veteran Member
Posts: 248
5/26/2010 2:46 PM
Example if there are 8 detail lines:
if (fc == "A" || fc == "C")
{
for (var i=0;i<8;i++) {
var sUserFld = lawForm.getFormValue("text22",i);
if (sUserFld == "")
{
lawForm.positionInFieldById("text22",i);
alert("Badge ID is required")
return false
}
}
}
Gary Davies
Veteran Member
Posts: 248
5/26/2010 2:48 PM
But I would code it:
if (fc == "A" || fc == "C")
{
for (var i=0;i<8;i++) {
if (lawForm.getFormValue("text22",i) == "")
{
lawForm.positionInFieldById("text22",i);
alert("Badge ID is required")
return false
}
}
}
Eddie Smith
Advanced Member
Posts: 39
5/26/2010 2:53 PM
Gary, it still does not check to see if the user field is blank, it just adds the record anyways. Any ideas?
Gary Davies
Veteran Member
Posts: 248
5/26/2010 3:08 PM
User fields are on IC21.3, did you add a new field to the detail area that is the text22. If yes then it is probably how you added it that you only see one occurance. You have to add WHILE in the detail area (select the area then click on Object button at bottom), if you just paste it on top you will get the field but it really is not part of the detail area.
You may have to fudge with the source as well becuase it really is not a field defined to the detail area.
Eddie Smith
Advanced Member
Posts: 39
5/26/2010 4:19 PM
I did add the new text field to the detail area, but I was within the detail area before I added it (I was in the child object ). It assigned text22 to the text box and then I used the data source and selected USR_FLD_01 (which as you mentioned was named text1, feild=_f2 in IC21.3. We first tried adding the user field @ the header but it would not show as available under the data souce. Fudging the source sounds like it may be the only option. Thanks.
Gary Davies
Veteran Member
Posts: 248
5/26/2010 8:25 PM
You can not just add the data source from other screens, you will have to populate the value in OnBeforeTransaction and do an AGS call to IC21.3 in OnAfterTransaction to update that User Field.
You are not authorized to post a reply.