Re: Can an Oracle Form be Dynamically built/re-arranged at Runtime?

From: DanHW <danhw_at_aol.com>
Date: 13 Sep 1998 03:45:00 GMT
Message-ID: <1998091303450100.XAA12508_at_ladder03.news.aol.com>


>
> Some of the data has more and different types of properties, than
>other data. This means that if I query the data for
>a part, I may have 25 fields with 25 names, another part may have 15
>fields with 15 different names. I need to create
>a form/page that is dynamically created that will accomodate all
>possible parts without knowing how many properties
>(fields & field names) that part has in advance (the fieldnames are
>queried from a table and a select statement to retreive
>the data is created from that on the fly).
>
>

As far as I know, there is no way to create a field at runtime. That means you have to define the form with the maximum number of fields you will ever want to have.

However, you can do what you suggested. One way that comes to mind, given the variations you describe it to create a base table that returns the PK of the row in question. Then on a post-query trigger, build your select statement and execute it. You CAN loop through existing items (use the NEXT_NAVIGABLE_ITEM, I believe, to get the next item) and populate them based on the existence of the field in the query. Set the unfilled fields to hidden if you want.

Another option is to (if possible) define a view that contains a generalized defintion of the view. For certain conditions, it returns a null for certain columns. You could flag the null ( or define another column in the view) and use that to hide that particular column on the form.

Hope that helps
Dan Hekimian-Williams Received on Sun Sep 13 1998 - 05:45:00 CEST

Original text of this message