mierlp Posted July 25, 2019 Share Posted July 25, 2019 Hi, My application contains around 90 tables for lookup use. Because I do not want to put this in a menu - it is getting too large, I want to do this in a database.The user sees a dbgrid with 2 columns: - table name as I would in the menu, for example, Type Payment - explanation in the form of a short sentence When the user double clicks on a line, the screen must be opened.In the database I save: - FormName (formTypePayment) or frmTypePayment (file name) - how to open 'show' or 'showmodal' So the form is already part of the application and normally I would call it FormTypePayment.show as follows How can I do this based on the data in the database? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted July 26, 2019 Share Posted July 26, 2019 Hello Please refer this link : http://forums.unigui.com/index.php?/topic/12325-ceate-form/&do=findComment&comment=65744 Quote Link to comment Share on other sites More sharing options...
mierlp Posted July 27, 2019 Author Share Posted July 27, 2019 Hi Hayri The code works great ...but is there a way to use the show or showmodal also from database. Every records contains the formname and the way how to show the form, this is a string field How can i use: Form.+table.fieldbyname('howtoshowform').asstring; that it will show the form Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 27, 2019 Share Posted July 27, 2019 Hi, If I understand you correctly, simple use the condition for this. Quote Link to comment Share on other sites More sharing options...
mierlp Posted July 27, 2019 Author Share Posted July 27, 2019 i need to pas the string of the datasebase field showform (it can be show of showmodal) to the FORM. But something like this is not working Form.+table.fieldbyname('howtoshowform').asString; or Form+'.'+table.fieldbyname('howtoshowform').asstring; or with quotedStr(table.fieldbyname('howtoshowform').asString i can do something like this but there must be a more elegant way if table.fieldbyname('howtoshowform').value = 'show' then form.show else form.showmodal Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted July 28, 2019 Share Posted July 28, 2019 You are trying to achieve Form.showmodal. This is not possible. You can't call a method from string like you did. This is the only way that you can do if table.fieldbyname('howtoshowform').value = 'show' then form.show else form.showmodal Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.