I have created one Table that get lookup from UserInfoTable. Corresponding i have create form for the same. When i click on Userid on the form then lookup appear and i select any user name corresponding networkAlias are fill into Alias field in form. This networkAlias come from UserInfoTable of that corresponding table. Now i want to save this networkAlias to my Table field called Alias. To getting networkAlias on the form I have do following code for the same:
select firstonly userInfo where userInfo.id == _II_FA_Users.II_UserName;
if (userInfo)
return userInfo.networkAlias;
return ‘’;
}
I have write display method on Form DataSource. Now how can i insert it to corresponding field Alias into My Custom Table. Please help on this. Probably i have spent half day on the same. It’s driving me crazy.
I will answer your question Of course what I understand,first sorry my english not very well I hope you will understand me.
userInfo.id == _II_FA_Users.II_UserName; You want to ınsert your table and field Id ,but you don’t use any update method for userInfo table,so you don’t see ıt
for insert you will select your table which you want to insert then assign your value and update it use mytable.update or use select for update or find(…,true);
I hope this help you,good working and not be crazy ;))
Thanks for your Answer. yes you are right i want to insert value that come up with : select firstonly userInfo where userInfo.id == _II_FA_Users.II_UserName;
II_FSA_Users.II_Alias = userinfo.networkAlias;
Now i want to insert a networkAlias into my Custom Table field Alias. can you please suggest where am i suppose to write this code?? Form level?? Table Level?? and in which method and what code i have to write into.
I don’t know your senario. this status change what do you want to do,first you don’t write select firstonly only use ‘select forupdate tablename’ and assingn then use mytable.update
this is also get first record ,you will try write it your fetch method on form or write data source init method ,I wondered why use write in display method? İf you want to display a variable you set it fetch method and describe classdeclaration then display it use display method,You don’t put insert /update code in display method this is just suggest.
select firstonly userInfo
where userInfo.id == this.II_UserName;
return userInfo.networkAlias;
}
If you really need to store the alias in another table, then you could do so by overiding the insert and/or update methods on the table. Hope this helps.