jcook331
29th December 2004, 18:12
We have a table that contains two text fields, but on the maintenance session we only want the users to be able to see and edit one of those fields. I am using the text.edit function behind a button on the form to do this. I have the text code displaying on the form and I can see that when I click the button and enter the text a new text code is put in the field. However, when I save the record and come back to it, the text code is 0 again. I can't make it save the text code to the record to the table. Any ideas?
lflfa724.txtr = text.edit("text.hold",language$,"","","","","text","",3)
Thanks
mark_h
29th December 2004, 18:40
Have you tried an execute(update.db) in the after.choice on the button?
Mark
jcook331
29th December 2004, 18:52
I did try that and it still does not update the table with the text code. I know before, I've had to actually put fields that I wanted to update on the form itself and hide them to get the values on the table. I tried this with the text field, but it won't let me make it an input field on the form.
lbencic
29th December 2004, 18:52
Also, you can use the standard Baan text functionality for this, unless you have more logic than you are describing. In Maintain Sessions, first Tab, choose the 'Texts' button, and only put in the text fields that you want to allow editing. Then, on Maintain Forms, Standard Options button, make sure the 'Text' option is checked. Then there is no coding required.
Mark is right, you need to select the table for update and issue the db.update/ commit.transactions if you are going to write yourself. Show us your code if you want to try this and it's still not working.
jcook331
29th December 2004, 18:56
Thanks Lisa
I did not know that you could select which texts you wanted to be visible through text manager. I was trying to re-invent the wheel here.
Thanks again,
Jason
jcook331
29th December 2004, 19:07
Thanks for your help too, Mark
chjagge
30th December 2004, 20:37
I had the same question and I got some replies. See post below
http://www.baanboard.com/baanboard/showthread.php?t=22459&highlight=text