Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
Results 1 to 9 of 9
-
04-06-2016, 05:45 PM #1New to the CF scene
- Join Date
- Apr 2016
- Posts
- 6
- Thanks
- 0
- Thanked 0 Times in 0 Posts
I am new to Javascript. I need to compare a previous value to current
Code://This Line of code gets me the current language of my database. How can I get the previous record?
Code:var Lang = (record.fields.LANGUAGEPREFERENCEGRO);
-
04-06-2016, 06:19 PM #2Senior Coder
- Join Date
- Jan 2010
- Location
- Behind the Wall
- Posts
- 4,556
- Thanks
- 14
- Thanked 476 Times in 471 Posts
there is no previous or next record in a database unless you apply some kind of ordering.
but since you do not have a result collection there, a previous record does not exist anyways.The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.André Behrens, NY Times Software Developer
-
04-06-2016, 10:31 PM #3New to the CF scene
- Join Date
- Apr 2016
- Posts
- 6
- Thanks
- 0
- Thanked 0 Times in 0 Posts
I do have ordering. I use a program called Connect Designer, where a database gets attached to a PDF. It uses JavaScript obviously. Support suggested I search google. They believed it was possible to retrieve the previous record information, but not sure how.
-
04-07-2016, 01:05 AM #4
Does Connect Designer have some sort of documentation?
-
04-13-2016, 04:38 PM #5New to the CF scene
- Join Date
- Apr 2016
- Posts
- 6
- Thanks
- 0
- Thanked 0 Times in 0 Posts
-
04-13-2016, 05:03 PM #6New to the CF scene
- Join Date
- Apr 2016
- Posts
- 6
- Thanks
- 0
- Thanked 0 Times in 0 Posts
During google search, I saw where I could use [-1] as shown below
But I am assuming that is for arrays. but I am not sure how to load a field into an array. There are 6 variations.Code:var PreLang = (record.fields.FieldName[-1]);
-
04-13-2016, 05:06 PM #7New to the CF scene
- Join Date
- Apr 2016
- Posts
- 6
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Just for reference here is the documentation.
PlanetPress® Connect 1.3 User Guide - Control Script API
-
04-13-2016, 05:28 PM #8
What is your endgame? I just skimmed over Planet Press' Connect product. It seems like it does a ton of stuff that you can already do fairly easily with PHP. Aside from the networking monitoring it looks like that program just over complicates things. The documentation isn't very clear and it's pretty messy. Without going into what exactly you are trying to accomplish and what database you are using, it's hard for anyone here to give you good answers.
-
04-13-2016, 07:22 PM #9New to the CF scene
- Join Date
- Apr 2016
- Posts
- 6
- Thanks
- 0
- Thanked 0 Times in 0 Posts
I am trying to print a banner page before the first record, then when the language changes.
For Instance
Banner Page for English
Prints all english records
Banner Page for Next language
Prints all records for that language
repeat for all languages
It is a new software. The old version used a language called presstalk and we were able to store the previous record language and compare the values of previous and current.



Reply With Quote

