B4J Question How do I launch a form name from a database

Wien.Mart

Member
Licensed User
Longtime User
Hello All,

I have a project with many forms. I put the form names in a small database and have a tableview to list all of them. How do I launch the form after clicking the entry from the tableview? I can get the value assigned to a variable. How do I change it to a statement?

frm = "regform.show"

how do I execute frm to show the form regform.show

Thanks in advance.

Mart
 

Daestrum

Expert
Licensed User
Longtime User
It would probably be easier to add a column for the actual form object, then use Show on that returned object.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I can get the value assigned to a variable. How do I change it to a statement?
There is no such thing.

Create a map with all the forms and their names as keys:
B4X:
Dim FormsMap As Map = CreateMap("Form1": Form1, "Form2": Form2, ...)

...

Dim frm As Form = FormsMap.Get(FormName)
frm.Show
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…