since ‎10-12-2009
‎10-12-2019
Gene--O
Level 1
Re: Time calculations past midnight
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Thank you thank you thank you thank you!Lt. Gene SchrieberAlabama Alcoholic Beverage Control BoardEnforcement District 1P.O. Box 1755Florence, Alabama 35631(256) 764-2435(256) 766-1793 Faxwww.abc.alabama.gov"It's not about where you've been, it's where you are going that matters"

Views

196

Likes

0

Replies

0
Re: Time calculations past midnight
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
I’m sorry, but I have one more issue to deal with:As I’ve said, I have “amIN”, “amOUT”, “pmIN” and “pmOUT” fields. If I enter values in “amIN” and “amOUT” only, then I get an incorrect sum for total hours.For example:It is possible that someone may work from 8am (amIN) until 12pm (amOUT) and then take leave the rest of the day. I need the script to then only total the “amIN” and “amOUT” fields for the total hours of 4.Will you help me one more time please?Thanks!!!Lt. Gene SchrieberAlabama Alcoh...

Views

194

Likes

0

Replies

0
Re: Time calculations past midnight
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Awesome!!!thank you so much!

Views

194

Likes

0

Replies

0
Re: Time calculations past midnight
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Radzmar,This is very helpful!!! BUT, it does not take into account a break for lunch. I have to have amIN, amOUT, pmIN, and pmOUT fields.Can you adapt what you have given me to account for a lunch break that may be more than one hour long?thanksGene-O

Views

195

Likes

0

Replies

0
Time calculations past midnight
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Hello All,I have created a timesheet that calculates times for me. BUT I have a problem when the shift ends at midnight, or goes past midnight.I have 4 time fields: amIN, amOUT, pmIN, pmOUT, and then a Total Hours Field. Everything works fine up until midnight. I have the follwing script in FormCalc as a calculate event of the Total Hours Field (taken from an example previously sent to me:var amIn = Time2Num(amIN, "HH:MM")var amOut = Time2Num (amOUT, "HH:MM")var pmIn = Time2Num (pmIN, "HH:MM")va...

Views

2.7K

Likes

0

Replies

9
Re: Number of days in a month
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Paul,How do I share the form on Acrobat.com for you to look at?thanks,Gene-O

Views

382

Likes

0

Replies

0
Re: Number of days in a month
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Thank you for your reply!However, this script is returning a value of “31” no matter which month I input in the date field.Here is my script – my date field is named “PPSD1”:var nDate = Date2Num(PPSD1.formattedValue, "DD/MM/YYYY")var xDate = nDatewhile (Num2Date(xDate+1, "M") eq Num2Date(nDate, "M")) do xDate = xDate + 1endwhile$ = Num2Date(xDate, "D")I have this in a calculate event of a NumericField.Any ideas?Lt. Gene SchrieberAlabama Alcoholic Beverage Control BoardEnforcement District 1P.O. ...

Views

382

Likes

0

Replies

0
Re: Number of days in a month
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Paul,Maybe you would be clearer on what I am looking for if I send you the form. I’m sorry that I am still too new at this to make myself clear!!!!!This form has 2 pages, one timesheet for each pay period in a given month. The first page works well because the days are fixed.The second page is where I have an issue:The pay period will always start with the 16th of the month (PPSD2) . The pay period will end with the last day of the month (PPED2). This will obviously change from month to month. I...

Views

382

Likes

0

Replies

0
Re: Number of days in a month
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Bruce,This is awesome, BUT, this grabs the current month. Sometimes I will have people that fill in the form for a previous month.I will have the user enter the first day of the month for which they will fill out the timesheet. I need the form to calulcate the end date of THAT month, based on the user input. (not necessarily the current month)thanks for being patient with me!!!Gene-O

Views

381

Likes

0

Replies

0
Re: Number of days in a month
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Ok Bruce,I think I understand what this script does, but I have no idea what to do with it. Stupid question: where do I put it to display the desired results?thanks so muchGene-O

Views

382

Likes

0

Replies

0
Re: Number of days in a month
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Bruce,Sorry for the late reply, but I didn't realize you had helped me. Your script is great - thanks again!!!Maybe you can help me again:I am creating a time sheet with 2 pay periods for each month. The first pay period is ALWAYS the 1st-15th of the month. The second pay period is the 16th through the last day of the month (different for each month).Can you help me with a script that will fill in the dates for the pay period?Thanks so much!Gene-O

Views

381

Likes

0

Replies

0
Re: Text Field Control Radio Button
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Paul,thanks for the reply!!! I copy/pasted your code into my file, and changed the names. I still don't get it to work!form1.Listing.Listing.Text1[0]::change - (JavaScript, client)if (xfa.event.Text1[0]=="010"){form1.CheckSheet.CheckSheet.LicType.Lounge.rawValue="14"} if (xfa.event.Text1[0]=="011"){form1.CheckSheet.CheckSheet.LicType.Package.rawValue="13"} if (xfa.event.Text1[0]=="020"){form1.CheckSheet.CheckSheet.LicType.Restaurant.rawValue="12"} I didn't include every radio button until I figu...

Views

86

Likes

0

Replies

0
Re: Text Field Control Radio Button
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Thanks Paul,I renamed everything the way I needed. Do you have an answer for why the script won't work and about using a variable?thanks!

Views

86

Likes

0

Replies

0
Re: Text Field Control Radio Button
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Thank you for your responses, but I'm still missing something! This is what I have:form1.Listing.Listing.Text1[0]::exit - (FormCalc, client)if ($ == "010") thenform1.CheckSheet.CheckSheet.LicType.Lounge = 1 elseif ($ == "011") thenform1.CheckSheet.CheckSheet.LicType.Package = 1 elseif ($ == "020") thenform1.CheckSheet.CheckSheet.LicType.Restaurant = 1 elseif ($ == "031") thenform1.CheckSheet.CheckSheet.LicType.ClubI = 1 elseif ($ == "032") thenform1.CheckSheet.CheckSheet.LicType.ClubII = 1 elsei...

Views

87

Likes

0

Replies

0
Text Field Control Radio Button
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Help PLEASE!I have a text field [Text1] that I want to control the value of a radio button. I have 13 radio buttons to choose from. For example if I enter "010" into Text1, then I want the corresponding radio button to be clicked. If I enter "011", then the next radio button in the group is checked.I have this script that fires in the change event of Text1:if (form1.Listing.Listing.Text1.rawValue = 010){form1.CheckSheet.CheckSheet.LicType.rawValue == 1;}The name of my RadioButton Group is "LicTy...

Views

1.7K

Likes

0

Replies

9
Re: Multiple conditions of an "If" statement
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Bibhu,Thanks for your response!I wrote this in FormCalc as a Calculate Event in the "Number" field:If (form1.TimeSheet1.Table1.Row1.Day.rawValue=="Friday","7")It works just fine: when I type "Friday" into the "Day" TextBox, it returns a "7" into the Number fieldBUT:I also wrote these, but no matter what I type ("Friday" or "Wednesday", etc) in the "Day" TextBox, it returns a value of "1" into the Number field in all instances:If (form1.TimeSheet1.Table1.Row1.Day.rawValue=="Friday","7");If (form1...

Views

109

Likes

0

Replies

0
Multiple conditions of an "If" statement
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Hello All,I am trying to create a timesheet that fills in days of the week for me. Specifically, I have a TextBox named "Day" that I input the day of the week, such as "Friday". I then have NumericBox1 that I want to automatically fill in the number "7", since Friday is the 7th day of our work week. Likewise:Saturday = 1Sunday = 2Monday = 3Tuesday = 4Wednesday = 5Thursday = 6Friday = 7I have written the follwing in FormCalc as a Calculation Event:if (form1.TimeSheet1.Table1.Row1.Day.rawValue=="F...

Views

609

Likes

0

Replies

2
Number of days in a month
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
I am creating a form with 2 date objects:"Date1" is a date object in which the user will enter the first day of a given month "MM/DD/YYYY";I need "Date2" to calculate the last day of the month from "Date1" "MM/DD/YYYY".Obviously, the date displayed in Date2 will vary because the months have a different number of days, so I can't just say "+30". Can someone help me with a JavaScript for FomCalc code to accomplish this?thanks!!!!Gene-O

Views

3.5K

Likes

0

Replies

12
Re: How do I learn?
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Thank you so much Niall. I will start diving into these resources ASAP!Gene-O

Views

117

Likes

0

Replies

0
How do I learn?
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Good morning all,I am relatively new to creating interactive forms in Adobe. While I have been able to learn basic stuff on my own and with help from these forums, I want to learn how to create the JavaScript programming it takes for complicated forms. All of the books I see relate JavaScript to web pages. It appears to me that the JavaScript used in web pages is different than what Adobe uses. Is this correct? I cannot find any resources that relate learning JavaScript to Adobe interactive form...

Views

734

Likes

0

Replies

3
Calculating Time
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Good Afternoon All,I am creating a timesheet that covers a two week period. I have a table set up with the following fields:TimeIn1, TimeOut1, TimeIn2, TimeOut2, Total Hours, OT HoursThe user will input their times for the morning (TimeIn1 and TimeOut1) and then the afternoon (TimeIn2 and TimOut2) for each day. I need the Timesheet to calculate how many hours were worked in that day. I would like it to round to the nearest quarter hour. At the end of the week, I need the form to add how many hou...

Views

1.8K

Likes

0

Replies

1
Re: Adding Days of the Week
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Thank's very much!!!You guys are awesome!Gene-O

Views

93

Likes

0

Replies

0
Adding Days of the Week
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Good Morning All,I am creating a timesheet. In this timesheet, I have a date field named "PPSD1". I have made a table for the days in this pay period. In this table, there are fields for the days of the week. I have inserted the below code, which takes the date I enter into "PPSD1" and calculates the day of the week, inserting it into a field named "Day1".Num2Date(Date2Num(PPSD1.formattedValue, "MM/DD/YYYY"), "EEEE")What I need to do, is have it calculate the remaining days of the week automatic...

Views

557

Likes

0

Replies

3
Re: Master Pages and Subforms
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Srini,I am sorry for the delay, I was pulled off onto another project for a while.I'm sure I have messed up your code somehow. Here is another link (please use this one, not previous files):https://acrobat.com/#d=mzWyD8fle0zMHeM9mCG9jQI am getting the following errors:Syntax Error on Page 2, SuccYes: clickNo Properties on Page 2, SuccNo: clickAlso:The table on Page 3 is not populating at all. It should populate with the data from each Page 2 ONLY when SuccYes is checked, without blank lines in b...

Views

99

Likes

0

Replies

0
Re: Master Pages and Subforms
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Srini,When I clicked on "no" on Page 2, I got the following:GeneralError: Operation failed.XFAObject.removeInstance:58:XFA:form1[0]:MasterPages[0]:Page2[2]:SummarySheet[0]:Successful[0]:SuccNo[0]:clickArgument mismatch in property or function argumentI have NO IDEA what this means. Can you help?ThanksGene-O

Views

99

Likes

0

Replies

0
Re: Master Pages and Subforms
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Unfortunatley, I am still having the issue mentioned in my last post. When a "yes" answer is checked, the form populates the chart. When a "no" answer is checked, the form does not populate the chart. However, there will be a blank row in the chart whenever a "no" answer is checked. I need to eliminate the blank rows.Thank you sooooo much!Gene-O

Views

99

Likes

0

Replies

0
Re: Master Pages and Subforms
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
I'm still having problems.Here is the new file: (I made a few changes since the last one was uploaded)https://acrobat.com/#d=XLf2w7S1QAfp-SkJSrpVUwI am getting it to populate the chart, and blank out the row in a "no" answer, but not move the next "yes" information up to not have a blank row in the chart.Thanks!Gene-O

Views

99

Likes

0

Replies

0
Re: Master Pages and Subforms
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
I hate to say it, but I found a problem:The form populates the Non-Compliance Location Listing form as indicated by a "yes" on theCompliance Check Summary Sheet. BUT: if the first Summary Sheet is a "yes", the second is "no", and the third is "yes", the Non-Compliance sheet produced a blank row between these the first and third entries. Is there any way to make the entries move up and not have any blank rows?Thanks!!!Gene-O

Views

99

Likes

0

Replies

0
Re: Master Pages and Subforms
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
thank you thank you thank you!!!!You both have been very helpful! I appreciate it.Gene-O

Views

98

Likes

0

Replies

0
Re: Master Pages and Subforms
Avatar

Gene--O

Gene--O
- Adobe LiveCycle
Srini,YOU ARE MY HERO!!!It has become apparent that I need to learn Java!Thank you so much for your help!!! If I may burden you with one more question:On Page1, there is a field called "Cost of Evidence". I would like for this to be a calculated dollar amount that is the sum of all of the Page2 fields called "Price". I can add fields on the same form, but cannot figure out how to add them up from difference instances of this subform.Do you mind to help me with that one too?Thank you soooooo much...

Views

98

Likes

0

Replies

0
Likes from