Lucy Jih
26th September 2002, 13:35
one form of Runtime Box is 'Transparent' with Multi-Occurrence, I would like to change one field attribute 'Field Type' with dynamic value 'Input' or 'Display' based on different field value, do you know how to do on field section of program script ?
Thanks.
Armando_Rod2000
26th September 2002, 15:30
Hi!!!!
I think if you use the field as Input type on form you would to use the event on.input: at the script and the attr.input = false.
Other way (i'm not sure about it) is to change the table ttadv301 wich had some informations about the fields on a form and you would change the ttadv301.typf (type --> Input -- Display -- Input Only -- Display Only ... ) of the field, once you must to refresh the field's form (refresh()).
I hope it this help you!!!
mark_h
26th September 2002, 17:04
Here is a sample from one of the scripts we use:
field.prt.cprj:
before.input: |#910.sn
if tiitm001.kitm = tckitm.purchase then
attr.input = false
message("Project information not accepted for purchase items")
endif |#910.en
I usually use the before.input section.
Good Luck!
Mark
Lucy Jih
30th September 2002, 07:26
set Form field type = 'Display' and change field property attr.input = false, its appearence is different on executed form, how to do could dynamic make form field running feeling look like setting form field typ = 'Display' ?
Thanks.
mark_h
30th September 2002, 16:28
Well I think I understand what you are asking, but I do not think you can change a form field type from input to display. At least not in my c3 version.
Good Luck!
Mark
Joy Conner
30th September 2002, 22:40
In the form, change the attribute from Display to Input. Then in the code use logic similar to Mark's posting.
field.prt.cprj:
before.input:
if tiitm001.kitm = tckitm.purchase then
attr.input = false
message("Project error message")
endif
Effectively when the user tries to modify this field, the message will be displayed and no input is permitted.
mark_h
30th September 2002, 23:44
Hi Joy!
I think she was looking to actually change the form field type from display to input in the code. I think she already new how to do what was suggested. Is there a way to change the form field type in the code? I have never seen a solution showing this, but that does not mean it is not possible.
Mark
Joy Conner
30th September 2002, 23:50
There is a predefined variable attr.inpfld that may support this. The manual says 1 = input field and 0 = display field.
I have never used this but sounds like it may be worth trying.
mark_h
30th September 2002, 23:58
My documentation says the variable is read only. I tried it on our 4c3 version and could not get it to work. I guess it has something to do with the "dumped" version of the form. If you changed that field I guess you have to dump the form again.
Mark
Lucy Jih
11th October 2002, 11:51
Hi Mark, Hi Joy,
Got your answer and understand what you mean.
thanks a lot.
Warm regards,
Lucy
muheeb
23rd November 2004, 12:35
Hello all,
and how can I make a dump for a Form in a code?
is there any DLL that make that possible?
and what its syntax?
Thanks.
mark_h
24th November 2004, 01:39
Yes - there is a dll for this. I do not know the name or format of it, but I have seen it. I will look for it when I return to work tomorrow. If you want in the mean time you could just run bic_info on the DLL's - not sure which sub-directory it is in.
Mark
muheeb
24th November 2004, 09:14
Thanks for replying,
I found the DLL "ottdlldumpform" that contain the function:
dump.form(string path(150), ref long errorno)
that what you saw? but this function don't take form codename, but
the path of the form? i.e. $BSE/application/...?
Thanks.
mark_h
24th November 2004, 15:31
Yes - that is what I saw. I am not sure if there is a function to use just the codename. You can look at the ttadv3100m000 using bic_info and see what libraries it uses - this includes ottdlldumpform. You should be able to build the path name to the form and then call this function. It is not easy but is possible.
Or if you want you can always use an API type function server to pull up the form and dump it that way. I am not user which option is dump - user option 6 I think. Just something else you can try.
Mark
NPRao
24th November 2004, 21:22
and how can I make a dump for a Form in a code? is there any DLL that make that possible? and what its syntax?
Muheeb,
Why would you want to develop that ? There are many changes wrt Tools between versions and there are different kinds of Forms now -
Static Forms, Dynamic Forms and Integration Sessions(Forms).
Each kind of form would dump in different format and I found in Reger version has a mix of all, althought most of them are Integration Sessions.
renzosing
21st February 2005, 21:40
I'm trying to edit a dynamic form that has a field that is displaying a value and I would like to allow the user to edit that value. I have gone into the properties and the field type is "input". I have also toyed around with other things and I still have no luck. Can anyone be of assistance?