Oracle Apex Generate valid wwv_flow_api.id - oracle

We want to dynamically build applications (regions and items), so we think we need to generate valid ids (p_id => ?) such that items can reside into regions (p_item_plug_id => ?).
Any clues?
Thanks in advance!

You can use the public package WWV_FLOW_ID to generate IDs. The ID returned here is used to populate all internal IDs for APEX related items. This will generate unique IDs for your dynamic scripts and not cause any issues when defining applications normally.
select WWV_FLOW_ID.NEXT_VAL from dual;

Related

Can :xdo_user_name be used in list of value in Oracle bi publisher? Or just works in data set

I am making a data mode. Involve a list of values to bind with parameter. Just want to ask if adding :xdo_user_name as the list of value sql parameter is possible?
I am hoping that user login, the menu will only show related data to him.
Many thanks.
Not sure if this can work or not.
You could create a List Of Values - Type SQL Query
select :xdo_user_name as USER_ID from dual
Now create new parameter of (parameter) type Menu and based on the above LOV. Next, in your datamodel you can use the newly created parameter any way you need.

Can SYS_GUID() function generate same guid at another db

I am planning to use SYS_GUID() function to generate primary key in an existing table(Primary key does not exist in that table as of now)
I wanted to know if in certain case if we sync data from one database to another , is it possible that Oracle generate same guid at another db ?
Thank you
No. GUID is Globally unique. See alsi the documentation https://docs.oracle.com/cd/B13789_01/server.101/b10759/functions153.htm
To be correct, a collision might be possible but is very unlikely as SYS_GUID() involves stuff like host identifier and so on. If you are talking about the same database but different user/schemas you are perfectly safe as the unique number is unique across all users.

Getting a dbid by table name

As far as I know, all QuickBase API calls are called using the following syntax: http://<quickbase>/db/<dbid>?
Is there a way to get the dbid field without navigating to that database table within QuickBase?
If the above is not possible, would anyone recommend anything other than creating another table that stores the IDs of the tables you want?
With the latter method, I believe I would only need to store one dbid and could pull down the rest (which I believe would still need to be user entered, but would be better than requiring them to change the code).
Thanks for the help!
API_GetSchema will return the list of dbids.
https://www.quickbase.com/db/<yourApplicationId>?act=API_GetSchema&apptoken=<yourApplicationTokenId>&fmt=flat

database driven form controls

How to do databse driveen jsp page,
Suppose i have 5 text fields,if user wants to put one of the form field as select box.JSp should identify and return the select box if it define in db as select box.
I dont know how to achieve this,can anyone suggest this.
Regards,
Raju komaturi
There are multiple tasks if you want to do this completely. The world at large has not gone this way and so there are not many tools (if any) for this. But basically here are the main ideas.
1) You want a "data dictionary", a collection of meta-data that tells you what the types and sizes of each column are, and the primary and foreign keys are.
2) For your example of "knowing" that a field should be a drop-down, this almost always means that column value is a foreign key to another table. Your code detects this and builds a listbox out of the values in the parent table.
3) You can go so far as to create a complete form generator for simple tables, where all of the HTML is generated, but you always need a way to override this for the more complex forms. If you do this, your data dictionary should also have column descriptions or captions.
There are many many more ideas, but this is the starting point for what you describe.

Adding a custom member to a mapped type

I'm using Linq 2 Sql and I'd like to add a custom member on one of my data type. For example: I have tables Companies, Departments and Employees. Departments has a FK in Companies and Employess has a FK in Deparments. Very simple.
My goal is to add an EmployeeCount property on Company that will, of course, returns the number of employee in the company (by suming the number of employee in company's departments).
As you may know, it's really trivial to do: just add a member on the partial class and do the stuff. The problem is, I now want to sort on this custom member.
How can I write this custom member for Linq to be able to translate the logic into a valid SQL orderby? I tried with a SPROC but did not success.
Any help appreciated!
Fabian
I guess your may need to add this column to your schema, in order for SQL server to recognize it and take in under consideration in his optimizations.
I would have add a trigger that will update this column automaticly upon changes on your data.

Resources