primary key not shown

primary key not shown

  

Hi there,

I create a new table with two columns:

name as a key

age number

infor text


but when i publish it and show in the browser,,, the name column is not displayed. How to displayit? tq


For good table design in outsystem, do we need a synthetic key for a table? and who will populate the key .. database (autoincrement) or entity in outsystem? tq



Hi Indra,

You say you have a table with two columns, but you list three. Also, you really don't want the name as primary key. If you create a table ("Entity" in OutSystems parlance) in Service Studio, you'll automatically get a Long Integer autonumber Id as primary key. Use that, and you'll be ok.


Kilian Hekhuis wrote:

Hi Indra,

You say you have a table with two columns, but you list three. Also, you really don't want the name as primary key. If you create a table ("Entity" in OutSystems parlance) in Service Studio, you'll automatically get a Long Integer autonumber Id as primary key. Use that, and you'll be ok.


tq Kil..

I create an extension because i need to connect to an Oracle database (and i don't know how to connect to database without making an extension). Unfortunately when i do not create a key in my table, there is only create action in the extension entity (no update,,,etc).  So i make name as a key... unfortunately when i published and displayed it in the browser the column name is not shown. 

There is no attribute id also in the extension entity created.

tq 


Solution

Hi Indra,

Ok, I didn't know you were connecting to an Oracle database via an extension (and yes, I think that's the only way to do it). Unfortunately, I have no experience with that.

However, you say that when you "publish and display in the browser" you lack a column. I don't quite understand that, as tables do not magically show up in a browser. Am I assuming correctly that you have created a screen in Service Studio that queries the tables and put the result on the screen in a TableRecords?

Solution

Kilian Hekhuis wrote:

Hi Indra,

Ok, I didn't know you were connecting to an Oracle database via an extension (and yes, I think that's the only way to do it). Unfortunately, I have no experience with that.

However, you say that when you "publish and display in the browser" you lack a column. I don't quite understand that, as tables do not magically show up in a browser. Am I assuming correctly that you have created a screen in Service Studio that queries the tables and put the result on the screen in a TableRecords?

tq sir, it works...

- i create a table with synthetic key

- create trigger before insert to assign auto sequence number to the key

- in the 'insert' web screen the synthetic key is shown, but i do not give it values

- the other attribute in the web screen i put values 

- and that's it.. the record is persistently stored in oracle

many thanks 


Good to hear you managed to solve it.