assassinator
18th September 2009, 09:01
One session, print Box label. Detail has 7 lines and the max lenght is 24. Now, users wants to print more informations on the label. So they would input about 40 characters one line, when they choose the label type is "LCD Label for CSIE". Only this option allow they input 40 characters, the others still 24 characters.
I got tow ideas. One is check input data lenght, the option is not "LCD Label for CSIE", if the lenght more than 24, I would send an error message. But this method could take effect after users input finished. Another is define detail as 40 characters. When the option is not "LCD Label for CSIE", I would change the detail domain to 24 characters lenght. Problem is how can I change the domain according to the different options?
jp.aalders
18th September 2009, 11:19
As far as I know it is not possible to create a dynamic domain, maybe you could do something with 'ottdllinputstr'.
Example
ret = input.string("Choice signing","Enter your text:",20,20, answer)
Based on your label type you can use different input strings and change the input length of this string.
Succes
JP
assassinator
18th September 2009, 11:37
As far as I know it is not possible to create a dynamic domain, maybe you could do something with 'ottdllinputstr'.
Example
ret = input.string("Choice signing","Enter your text:",20,20, answer)
Based on your label type you can use different input strings and change the input length of this string.
Succes
JP
Define mulit-strings means a bit dim-witted.
How can I define a input string is 40 characters lenght, and control users could input 24 characters only?
jp.aalders
18th September 2009, 12:50
Create 2 input.strings and call these from the report script ( before.report ).
F.i.
on case label
case LCD:
ret = input.string("Enter text:","Enter your text:",40,40, answer)
break
case CSIE
ret = input.string("Enter text:","Enter your text:",24,24, answer)
break
endcase
manish_patel
18th September 2009, 14:39
Not sure; but you can try attr.imax predefined variable in before.input subsection of detail field.
before.input:
if LCD_Label="CSIE" then
attr.imax=40
else
attr.imax=20
endif
assassinator
21st September 2009, 04:41
Create 2 input.strings and call these from the report script ( before.report ).
F.i.
on case label
case LCD:
ret = input.string("Enter text:","Enter your text:",40,40, answer)
break
case CSIE
ret = input.string("Enter text:","Enter your text:",24,24, answer)
break
endcase
Thanks for your reply! But what I mean is to control users input data in form field, not in the report.
If control in report, we can use like the followed:
domain tcmcs.st40m answer
if LCD_Label <> "CSIE" then
answer = answer(1;24)
endif
assassinator
21st September 2009, 04:45
Not sure; but you can try attr.imax predefined variable in before.input subsection of detail field.
before.input:
if LCD_Label="CSIE" then
attr.imax=40
else
attr.imax=20
endif
Yes. This method is currect. Thank you very much!!
Predefined variables could achieve a lot of features! Thanks for help!