Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Bug? Mystery Science Theater ...or demon!

Avatar

Level 7

Greetings All,

OK, I have a formCalc script on the calculate event of a text field. It assigns different strings to the text field using an if/elseif/else evaluation of the value of a sibbling numeric field.

I decided I wanted change the three word string in final else assingment to one with the first letter of each word capitalized. As it was, the string had only the first word capialized--as in "Probably not insurable" changed to "Probably Not Insurable"

I did the following:

I simply edited the string in the Script Editor and clicked preview--result: only the 1st word was capitalized--looked at the script--the script had reverted--now it only had the first word capitalized? But I had changed it!

REPEAT ABOVE--SAME RESULT

Repeat above EXCEPT clicked save while looking at the Script Editor--OK--then preview--same result--went back to Design View with the Script Editor still open in the same exact place and the script had changed back. But, how can that be?--I saved the file with the change.

I copied and pasted the script into a plain text editor, made the change there, completely deleted the script in the Script Editor and pasted the edited script from the plain text editor. Clicked preview and the change worked--no problem. Everything OK. Saved with a different name.

Now, I must emphasize that I double checked the object/event in the Script Editor just to make sure I wasn't looking at two different scripts. Besides, when you click preview with the Script Editor open, it remains on that object/event when you switch back to Design View, but I double checked, just in case. I can assure you--there are not 2 different scripts.

I still have the original saved file and IT STILL DOES IT!  I am using LC ES2 v9.0 on a Win7 (64 bit).

Cue the theremin.

http://en.wikipedia.org/wiki/Theremin

Seriously,

Stephen

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Stephen, all the old bugs are coming out of the woodwork. We came across this before. If when making small changes like replacing "i" with "I", if you type a space at the end of the line, the changes will stick. Give it a try. Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Stephen, all the old bugs are coming out of the woodwork. We came across this before. If when making small changes like replacing "i" with "I", if you type a space at the end of the line, the changes will stick. Give it a try. Niall

Avatar

Level 7

Hey Niall,

You're exactly right--that fixed it--Thanks for the tip!

Cheers!

Stephen