Skip to main content
New Participant
July 30, 2021
Question

Text field in dynamic stamp

  • July 30, 2021
  • 2 replies
  • 3635 views

 

Hello people

 

I have read through countless postes and am unable to figure out how to get this stamp to work 

 

text 1 workes perfectly as a automatic date 

 

i need text 2 to be just a regular text feild so when i wherever on the screen i can then add a 6 digit number ex 416051 not more not less 

 

Much aprechiated 

This topic has been closed for replies.

2 replies

bebarth
Community Expert
July 31, 2021

To be placed in calculation script of the Text2 field:

var answer="";
while (!/^\d{6}$/.test(answer) && answer!=null) {
	var answer=app.response({
		cQuestion: "Enter a 6-digit number.",
		cTitle: "Reference",
		cLabel: "MAXIMO #",
		});
}
if (answer!=null) event.value=answer;
else event.value="";

 

try67
Community Expert
July 31, 2021

If you do that it will prompt you to enter the value even when you just preview the stamp in the stamps list...

try67
Community Expert
July 30, 2021

Stamps don't work like that. Once you apply them all the fields in them become flattened. You have to prompt the user to enter the value for this field when the stamp is applied, and then populate it into the field. After the stamp is applied it can't be edited any longer. You can only delete the stamp and re-apply it using a new value.

New Participant
August 31, 2023

Hello try

You seem like a expert so i would love to ask for your help with a dynamic stamp problem of mine. 
I have a dynamic stamp with many fields which are filled by: value = app.response(""). in some cases i don't need the script to ask for all the fields so it would be nice that whit some kind of input in the app.response-pop-up i could end the script prematurely. I hope you understand my problem. English and Coding are not my native languages..haha
Thanks in advance

Timo

try67
Community Expert
August 31, 2023

If you want to include logic in determining which values to prompt the user to enter using a dialog object might be a better idea. This is not a trivial scripting task, though.