1
votes

I want to add a new Oracle Apex form to insert/delete tuples on a table. The problem is, when i create the form via wizard, there is one step "primary key source" that make me choose one method to automatic add primary key (plsql, trigger or existing sequence), and i want to manually write the pimary key case by case.

there is a way to do that?

1
There is not really anything stopping your from using an own trigger (afaik apex lets you choose "existing trigger" but will not ask for specifics and just assume all is in order), but can I ask what you'd put in your primary key column? Are you planning on not using an ID but rather a semantical relevant value? I'd honestly reconsider in such a case, but of course it is up to you and you database design. - Tom
Hi tom, the key is the ISBN of the book. The problem with the trigger is, i have no idea how can i do that. Because i want to manually enter the ISBN. - user2236919
The thing is, wouldn't it be better to still use an ID as a primary key, and have a column for the ISBN number, with a unique key constraint on the column, versus messing around with data in a primary key field? There are many discussions on this subject, but you'll find most will favour primary key fields which have no semantical value at all. This isn't an answer on your question of course, but since you're obviously setting up something it'd be best to have a good database model to work on. - Tom
Thanks Tom, probably i will do that. I think it's better that way. - user2236919
PS: I can't mark your comment as the answer, but it was very usefull to me. - user2236919

1 Answers

1
votes

Create the form that does not include primary key. Primary key input field will then be created with "hidden" property. Just go to page items and change that property to "text field".