Level 1

0% to

Level 2

Tip /

to gain points, level up, and earn exciting badges like the new
Mission!

View all

Community profile whyisthisme Level 7
Job title here
Location here

Level 7

Joined the community 03-08-2011 11:16:58 PM
Offline
Re: A repeating dynamic table with a sum total row showing or hiding fields
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
try putting your code in the calculate event

Views

401

Likes

0

Replies

0
Re: Calculating the time difference between to fields
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

689

Likes

0

Replies

0
Re: Calculating the time difference between to fields
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

710

Likes

0

Replies

0
Re: adding dropdown categories to script
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

316

Likes

0

Replies

0
Re: Forcing a text field to not accept smaller value than 3
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

544

Likes

0

Replies

0
Re: How do I calculate the average of ONLY the populated fields?
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

397

Likes

0

Replies

0
Re: Problem with formcalc code not properly executing in a dynamic table
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
you need to put "Sum()" around Table2.Row1[*].staffrequired as you have for shortdays

Views

352

Likes

0

Replies

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

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
you would put it in an event (such as the click event) for the text you want to hyperlink

Views

424

Likes

0

Replies

0
Re: Livecycle ES2 Footer TextField not Populating.
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

388

Likes

0

Replies

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

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
you can use:xfa.host.setFocus("placeYouWantToGo")to move about within the document

Views

425

Likes

0

Replies

0
Re: Form Content structure and Formating
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

309

Likes

0

Replies

0
Re: Form Content structure and Formating
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

316

Like

1

Replies

0
Re: 2 Different Text Fields filled based on Drop Down List Selection
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

363

Likes

0

Replies

0
Re: Need help with table reference
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

367

Likes

0

Replies

0
Re: Need help with IF Statement!!!
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

412

Likes

0

Replies

0
Re: Check Section for Completeness
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

433

Likes

0

Replies

0
Re: Need help with IF Statement!!!
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme

Views

417

Likes

0

Replies

0
Re: Need help with IF Statement!!!
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
sure post it online and I will have a look.

Views

388

Likes

0

Replies

0
Re: Need help with IF Statement!!!
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
try putting \$ = before your sum:\$ = sum (rrtotal, programtotal, financetotal, lead.....

Views

418

Likes

0

Replies

0
Re: Need help with IF Statement!!!
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

413

Likes

0

Replies

0
Re: Need help with IF Statement!!!
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

416

Likes

0

Replies

0
Re: Need help with IF Statement!!!
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

416

Likes

0

Replies

0
Re: Seeking to hire a LiveCycle Designer/Programmer
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
Which country are you in?

Views

389

Likes

0

Replies

0
Re: Run Code once on form load
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
Is there any other code in or relating to TextField2?

Views

325

Likes

0

Replies

0
Re: Run Code once on form load
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
try putting in the docReady event of TextField2:\$ = TextField1.rawValue

Views

320

Likes

0

Replies

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

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
you need another endif at the end (you have a nested if statement and only 1 endif)

Views

334

Likes

0

Replies

0
Re: Need Help with a drop down list
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

359

Likes

0

Replies

0
Re: Old chestnut: 3 or more dependent dropdown boxes
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

573

Likes

0

Replies

0
Re: Need Help with a drop down list
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
You have a space in the word 'value' in 'formattedVal ue' for boxes 3-5.

Views

331

Likes

0

Replies

0
Re: Exit event not firing on tab
whyisthisme
Level 7

Likes

41 likes

Total Posts

324 posts

59 solutions
View profile
whyisthisme
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

342

Likes

0

Replies

0
Likes given to
Likes from