Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

How do I lock the work order number on my form to not change

Avatar

Level 2

Thanks to everyone who helped on this form.  The work order number is setup to generate according to the date and time, only problem is that it changes everytime it gets opened, can it be setup somehow to lock it in automatically when I send it or the customer sends it back?   Form is attached

Thanks

Mike

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I put a default value of 123456 in the object to test ......you can remove that default value from the Value tab on the Object palette.

Paul

View solution in original post

6 Replies

Avatar

Former Community Member

Simply put a condition in to test if there is anything in the field .....if it is empty then go ahead and calculate your number if there is something in it then do not calculate the number. Also you shodul not use teh Calculate event for this script. I moved it to the docReady event. It will work on the calculate event but the calc event is fired many times in the normal operation of the form where as teh docReady event is only fired once (when the form loads). This is a much more efficient way to use your form.

See the modifed attachment.

Paul

Avatar

Level 2

Thanks for looking at this Paul, for some reason it  (work order number ) is stuck on 123456 and when I open the form it only lets me save a blank copy? any clue?

Thanks

Mike

Avatar

Correct answer by
Former Community Member

I put a default value of 123456 in the object to test ......you can remove that default value from the Value tab on the Object palette.

Paul

Avatar

Level 2

Thanks Paul, I want to extend features to Acrobat Reader, but when I bring it into professional, it fires ofF (doc ready) and puts a work order number in it, how can I set it up to extend the features for Reader? Hope that makes sense.

Mike

Avatar

Former Community Member

We will need to add something to the form that will allow you to blank out the field. What if we put a hidden button somewhere that would blank the field. Then you coudl extend it and then the code woudl work as we built it? The problem woudl be that the users coudl "accidententally" hit the button and reset the field. If the button is hit I coudl ask for a password and if the password was OK then reset that field. Only you woudl know the password and the location of the button ......is that acceptable?

Paul

Avatar

Level 2

That would be perfect!

Thanks

Mike

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----