since ‎03-08-2011
‎10-12-2019
whyisthisme
Level 5
Re: A repeating dynamic table with a sum total row showing or hiding fields
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
try putting your code in the calculate event

Views

370

Likes

0

Replies

0
Re: Calculating the time difference between to fields
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
The result should be the number of hours/minutes difference - but yes with that pattern it shows as a time.To make sure the end time is after the start time use Time2Num for both and then make sure the number of the end time is larger than the number of the start time.

Views

610

Likes

0

Replies

0
Re: Calculating the time difference between to fields
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
You would use the functions Time2Num and Num2GMTime to do this. In the calculate event of the total time field you would put something like (in formcalc):var startT = StartTime.formattedValuevar endT = EndTime.formattedValuevar differenceT = Time2Num(endT, "HH:MM:SS") - Time2Num(startT, "HH:MM:SS")$ = Num2GMTime(differenceT, "HH:MM:SS")- the "HH:MM:SS" bit should be whatever time pattern you have used.

Views

630

Likes

0

Replies

0
Re: adding dropdown categories to script
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
If Limbo1, Limbo2 etc are in the same dropdown and you want them to do the same thing then just add them to if statement:if(this.rawValue == "Limbo" || this.rawValue == "Limbo 1" || this.rawValue == "Limbo 2")

Views

291

Likes

0

Replies

0
Re: Forcing a text field to not accept smaller value than 3
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
It is probably best to use a numeric field rather than a text field if you only want numbers but either way you can put in the exit event of the field (in formcalc):if ($ < 3) thenxfa.host.messageBox("The value cannot be less than 3")$ = ""endif

Views

515

Likes

0

Replies

0
Re: How do I calculate the average of ONLY the populated fields?
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
In formcalc the function Avg will calculate the average of only the fields with a value in them. So you would would put in the calcuate event of the average field:$ = Avg(Q1S1,Q1S2,Q1S3,Q1S4, etc)

Views

361

Likes

0

Replies

0
Re: Problem with formcalc code not properly executing in a dynamic table
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
you need to put "Sum()" around Table2.Row1[*].staffrequired as you have for shortdays

Views

330

Likes

0

Replies

0
Re: Hyperlink to a Page in the current document ? LiveCycle v8.2
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
you would put it in an event (such as the click event) for the text you want to hyperlink

Views

356

Likes

0

Replies

0
Re: Livecycle ES2 Footer TextField not Populating.
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
Can I suggest trying the code the other way around. So in the masterpage footer put something like (in formcalc):if (Page1.title.isnull == 0) then$ = Page1.titleelse $ = ""endif- obviously changing the name of Page1.title to whatever your field is called. You can put that in the layoutReady event of the footer

Views

362

Likes

0

Replies

0
Re: Hyperlink to a Page in the current document ? LiveCycle v8.2
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
you can use:xfa.host.setFocus("placeYouWantToGo")to move about within the document

Views

358

Likes

0

Replies

0
Re: Form Content structure and Formating
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
The rows that you want to repeat must be set as 'Header Row's under Object>Row>Type and they the table and row must be set to 'Allow page breaks within Content'

Views

288

Likes

0

Replies

0
Re: Form Content structure and Formating
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
It looks like you have set your subform to have the content positioned. If you set it to flowed it will work the way you want. To get the header rows to repeat on the next page check the buttons under Object>Pagaination for the rows.

Views

294

Like

1

Replies

0
Re: 2 Different Text Fields filled based on Drop Down List Selection
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
in the exit event of the dropdown put something like (in formcalc):if ($.rawValue == 1) thenphoneNumber = "12345566"email = "blah@email.com"elseif ($.rawValue == 2) thenphoneNumber = "67890"email = "blah2@email.com"endif(make sure you have the "specify item values' box ticked for the dropdown list in object>binding)

Views

342

Likes

0

Replies

0
Re: Need help with table reference
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
In the second table you could put in say the calculate event of the name cell (in formcalc):$ = table1.Row[$.parent.index].namerenaming everything to what you have called them. Also depending on your hierarchy you may need a few more "parent"s in your index.

Views

343

Likes

0

Replies

0
Re: Need help with IF Statement!!!
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
Just put the script into the calculate field of level instead:if (tpe > 1000 and tpe <= 1985) then$ = "I"elseif (tpe > 850 and tpe <= 1000) then$ = "II"elseif (tpe > 550 and tpe <= 850) then$ = "III"elseif (tpe <= 550) then$ = "IV"else $ = ""endifAlso just having a look at your form - for next time you could have saved yourself a whole lot of time in your setup by using tables for all those fields rather than making each one a seperate numeric field.

Views

341

Likes

0

Replies

0
Re: Check Section for Completeness
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
in formcalc:if ((section3a.CheckBox1 == 0 and section3a.CheckBox2 == 0 and section3a.CheckBox3 == 0 and section3a.CheckBox4 == 0 and section3a.CheckBox5 == 0 and section3a.TextField1.isNull) or (section3b.TextField2.isNull and section3b.DropDownList1.isNull) or section3c.TextField3.isNull or section3d.TextField4.isNull or (section3e.CheckBox1 == 0 and section3e.CheckBox2 == 0 and section3e.CheckBox3 == 0 and section3e.CheckBox4 == 0 and section3e.CheckBox5 == 0 and section3e.CheckBox6 == 0 and s...

Views

400

Likes

0

Replies

0
Re: Need help with IF Statement!!!
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
You can upload your file on acrobat.com

Views

346

Likes

0

Replies

0
Re: Need help with IF Statement!!!
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
sure post it online and I will have a look.

Views

317

Likes

0

Replies

0
Re: Need help with IF Statement!!!
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
try putting $ = before your sum:$ = sum (rrtotal, programtotal, financetotal, lead.....

Views

347

Likes

0

Replies

0
Re: Need help with IF Statement!!!
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
level is showing as IV because tpe is 0. The code above does not change tpe so I am not sure why is has ruined your calculation. Can you post what you have in your calculation event?

Views

343

Likes

0

Replies

0
Re: Need help with IF Statement!!!
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
you can put that code in the calculation event of tpe after the code you already have to work out the value of tpe

Views

345

Likes

0

Replies

0
Re: Need help with IF Statement!!!
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
in the exit event of "tpe" put:if ($ > 1000 and $ <= 1985) thenlevel = "I"elseif ($ > 850 and $ <= 1000) thenlevel = "II"elseif ($ > 550 and $ <= 850) thenlevel = "III"elseif ($ <= 550) thenlevel = "IV"else level = ""endif(this assumes the user is entering the amount in the tpe cell. If it is worked out by a calculation you can use the same code but put it in a different event depending on what you are doing)

Views

343

Likes

0

Replies

0
Re: Seeking to hire a LiveCycle Designer/Programmer
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
Which country are you in?

Views

364

Likes

0

Replies

0
Re: Run Code once on form load
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
Is there any other code in or relating to TextField2?

Views

303

Likes

0

Replies

0
Re: Run Code once on form load
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
try putting in the docReady event of TextField2:$ = TextField1.rawValue

Views

296

Likes

0

Replies

0
Re: FormCalc Formula to tell the difference between two time fields if they are populated - Help please
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
you need another endif at the end (you have a nested if statement and only 1 endif)

Views

308

Likes

0

Replies

0
Re: Need Help with a drop down list
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
You haven't said where you are putting this code, but if it is in a third field (where you want the results to go) then try this:if (DropDownList1.rawValue == 1)then $ = form1.Table2.Row3.DateTimeField1.formattedValueelseif (DropDownList1.rawValue == 2)then $ = form1.Table2.Row3.DateTimeField1.formattedValueelseif (DropDownList1.rawValue == 3)then $ = Num2Date((Date2Num(form1.Table2.Row3.DateTimeField1.formattedValue, "MMM DD, YYYY") + 14), "MMM DD, YYYY")elseif (DropDownList1.rawValue == 4)then...

Views

338

Likes

0

Replies

0
Re: Old chestnut: 3 or more dependent dropdown boxes
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
try using the exit event eg. in the exit event of combo_2 you might say something like:if (combo_0.rawValue == 1 and combo_1.rawValue == 1) {........}

Views

538

Likes

0

Replies

0
Re: Need Help with a drop down list
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
You have a space in the word 'value' in 'formattedVal ue' for boxes 3-5.

Views

308

Likes

0

Replies

0
Re: Exit event not firing on tab
Avatar

whyisthisme

whyisthisme
- Adobe LiveCycle
Yes it seems to be an anomaly because I have other tables doing the same thing in the form and they all work - it is just this one table. I can't post it for confidentiality reasons but thanks anyway. I will have to find a way around it.

Views

317

Likes

0

Replies

0
Likes given to