Option initialization

Hi, I’m struggling with a problem I really can’t understand. I have a customized table which holds some entity definitions, let’s call it “Technical Property”, each TP has a code, a description and other attributes. Now, I need to add translations for each TP code and each language - the easy way to do it would be to make a second table with TP code, Language code and Translation text, but my customer is running out of tables, so I chose to use instead table 280 “Extended Text Line” and did the followings: 1) Added a “Techn.Property” option to “Extended Text Line”.“Table Name” OptionString property 2) Changed “Extended Text Line”.“No.” TableRelation property adding the new condition ‘Table Name=CONST(Techn.Property) VIPA_CodiciCarattTecniche’ to the already existing conditions and relations 3) Made a tabular form “Technical Property Translations” with table 280 as the SourceTable and a filter ‘WHERE(Table Name=CONST(Techn.Property)’ in the SourceTableView property; In the OnNewRecord trigger of the form I put the code: “Table Name” := “Table Name”::“Techn.Property”; Later I duplicated the abovesaid code in the OnInit and OnOpenForm triggers and even in OnNextRecord, but only later. 4) On the Technical Property Card I added a button which should call the Translation form for the current TP; I setted the button propeties as usual: PushAction= RunObject RunObject= Form “Technical Property Translation” RunFormLink=Table Name=CONST(Techn.Property),No.=FIELD(MyCode) I wasn’t expecting any problem at all. Instead, when I try to push the button to launch the translation form I get the following error: “Standard Text XY does not exist” [B)] Standard Text is option ‘0’ in the “Table Name” OptionString; Table 280 is empty; I can see in the debug the table Rec being evaluated with right value in “Table Name” field and then, suddenly go back to 0 without any apparent reason. I think I’ll make a new table after all, but I can’t stand to not be able to understand what’s wrong with this one! [xx(] Does anybody have any suggestion about what I did wrong? Thank you and Happy New Year Anna

Ciao Anna, I’m not sure if I understood your problem, but I just tried the following in a 3.70B Database: I made a new T5000 with a code and a text-field. In T280 I added to F1 option Value 10: TP, in Field No. I added the table relation to the new table 5000. Then I made 2 new Forms: 1 form (F50000) for T50000 and a new form (F50001) for T280. In F50000 I added a command button with the same runformlink you used: Table Name = CONST(TP),No.=FIELD(Code). AutoSplitKey was set to Yes in F50001. It works as expected. /Karl

Citazione:

Ciao Anna, I’m not sure if I understood your problem, but I just tried the following in a 3.70B Database: I made a new T5000 with a code and a text-field. In T280 I added to F1 option Value 10: TP, in Field No. I added the table relation to the new table 5000. Then I made 2 new Forms: 1 form (F50000) for T50000 and a new form (F50001) for T280. In F50000 I added a command button with the same runformlink you used: Table Name = CONST(TP),No.=FIELD(Code). AutoSplitKey was set to Yes in F50001. It works as expected. /Karl
Originariamente inviato da kadler - 2004 Dec 29 : 15:13:15

Hi, Karl You understood it right. The only difference that I was able to see in what you did is the AutoSplit property. I tried it, but my form is still not working! [B)] If I open the Translation form by itself, it works, but called by the other one it doesn’t. More: I inserted manually a record into table 280 with TP code ‘XY’ and Language ‘E’; now, if I try to launch the form from the TP card for the XY code, it works, but only for that. I guess this does mean something, but what? Anna

Anna, If you want, I can mail you my 4 objects (T280, T50000, F50000, F50001), so you can solve the problem. /Karl

Citazione:

Anna, If you want, I can mail you my 4 objects (T280, T50000, F50000, F50001), so you can solve the problem. /Karl
Originariamente inviato da kadler - 2004 Dec 29 : 15:53:11

Thank you, but I solved the problem, although I can’t really say I did understand it! [:I] I just blanked the SourceTableView property in what would be your form 50001! Which means the form will not be usable alone, since it would show whatever is in table 280, but I can live with that. Do you understand why it does work so? I don’t! [}:)] Thank you, anyway. If it weren’t for your input, I’d give up and go for a new table. [:)] Anna PS - Are we two the only ones still working today? [:D]

Ciao Anna, In my form 50001 SourceTableView is , and I did not add code to any trigger. /Karl

Ciao Anna, I’m not sure if the way it works here is a feature ore not, but when you look at F47, which is used as subform in F43 it works. /Karl