Home » Developer & Programmer » Forms » Create view from forms based on values selected in forms (forms 6)
Create view from forms based on values selected in forms [message #586590] Fri, 07 June 2013 12:16 Go to next message
sethumurugan
Messages: 61
Registered: June 2010
Location: Chennai
Member
Friends,

First of all sorry if this is re-post. could not locate any thread with similar requirement.

I am working on a simple form which will help the user to fetch required columns of employee master.

For that i have created a form which will display the column names and select option. When user clicks on query, the form will display the selected columns in a block. After going thru if required the user can download it to excel.

As of now I do not have filtering option.

For this I thought of creating view based on the selection and then fetch records from the view and display it in form.

To achieve this I would like to know How I create or replace a view dynamically based on values selected. I remember doing this sort of thing long back, but could n't recollect it.

Some pls help me.

If there are any other simple method than this pls let me know.

Sethu
Re: Create view from forms based on values selected in forms [message #586595 is a reply to message #586590] Fri, 07 June 2013 14:03 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't think that it'll work. Items in a form must be pre-defined (i.e. you can't create them dynamically), therefore there's no use in creating a view dynamically (you'd to that using FORMS_DDL or, if you prefer a stored procedure, EXECUTE IMMEDIATE).

Now, how to save selected columns' values in Excel, huh, no idea ... I'm useless when Forms + Excel combination is concerned.
Re: Create view from forms based on values selected in forms [message #586605 is a reply to message #586595] Fri, 07 June 2013 21:51 Go to previous messageGo to next message
sethumurugan
Messages: 61
Registered: June 2010
Location: Chennai
Member
Thanks littlefoot.

I have planned to do the following




    I will built the query to build view dynamically based on selection.
    Then create view from forms [Since I have other query need to be executed for example Gender as mail if the gender column is M thru decode I thought view would be fine] using Forms_ddl [This is where I want to confirm even though I know this prior to this].
    I have already created multi row block with 100 items.
    I will dynamically change the prompt, dynamically and store the related values in those items.
    Once the block is filled with details, if necessary the user can download the same into excel [Have developed another procedure for this]
Re: Create view from forms based on values selected in forms [message #586673 is a reply to message #586605] Sun, 09 June 2013 07:01 Go to previous message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
I have already created multi row block with 100 items.

Right; that sounds reasonably enough but can't be really called "dynamic" because - it is not. You have precreated 100 items per record, desperately hoping that it'll be enough. Once a 101st column appears, that design will fail because it can't automatically - or "dynamically", if you prefer - accommodate the new situation.

Besides, I'm quote sure that it is impractical viewing up to 100 columns on an average screen (i.e. requires scrolling left/right).

Anyway, if that solution (a view created with FORMS_DDL, 100 items, etc.) does what you intended it to and, above all, makes your users happy - all I can say is "go ahead"! Best of luck!
Previous Topic: connection string in form builder 6i to SYS user
Next Topic: update record
Goto Forum:
  


Current Time: Wed May 08 08:22:51 CDT 2024