Skip to main content

Generate Dynamic Drop-down List with SQL Script in Peoplesoft Pages

Hello,

I would like to share my knowledge about how can you create dynamic drop-down list and use in PS pages with some tricks.

Firstly, you need to create new field which must be translate field.



Field length must be four for that field cause we want to use this field with translate values.





Insert this field in a derived record and save it(you don't need to build derived record after saving).



View field properties for new translate field and go to edits tab. Change edit type as table edit and choose translate table edit as bellow;



drag and drop new translate field to a new page and you can see that view of field automatically change like it's a drop-down list.



Save it.

I created a new table to show values;

drop table asdasd;
create table asdasd (seqno number,product varchar2(100 char));
insert into asdasd values(1,'comp');
insert into asdasd values(1,'comp2');
insert into asdasd values(1,'comp3');
insert into asdasd values(1,'comp4');
commit;

and I'm going to use that script;
select seqno,product
from asdasd;

In page activate, type code as bellow;

Local SQL &SQL;
Local Rowset &rset0;
Local string &type, &descr;

/*dönem dropdown list*/
&FLD = GetRecord(Record.IMPRT_GRADE_WRK).GetField(Field.SSR_TERM);
&FLD.ClearDropDownList();
&SQL = CreateSQL("select seqno,product from asdasd;");
While &SQL.Fetch(&descr, &type)
   &FLD.AddDropDownItem(&descr, &type);
End-While;

Finally, you will be able to see values which is result of your select statement in drop-down list in the page.

If you view your field variable restricted, after save your page in App Designer than change field length more than four. So, life will become easier :)

Loves,


Comments

Popular posts from this blog

PGConf Europe 2018 Güncesi 1

Merhaba, Diğer tüm veritabanları arasında en popüler açık kaynak kodlu veritabanı olan PostgreSQL, tüm yıl boyunca farklı ülkelerde bir çok konferansa sahiplik yapmaktadır. En bilinenleri PGDay ve PGConf'dur. Ayrıca her yıl 2 Şubatta Brüksel’de yapılan FOSDEM etkinliğinde de PostgreSQL konuşmalarının yapıldığı bir oturum mutlaka olmaktadır. PostgreSQL etkinlik detaylarına bu linkten ulaşabilirsiniz. Bu yıl ki PGConf Europe konferansı Lizbon'da yapıldı. Konferansla ilgili izlenimlerimi, yaptığım neredeyse 6 günlük yolculuğun en başından tüm detaylarıyla birlikte paylaşmak istiyorum. Yolculuğumuz sevgili Seda ile birlikte Atatürk Havalimanı’ndan sabah 07:30’da Lizbon’a direk uçuşla başladı.  Hava şahaneydi ve uçuşumuz konforlu geçti. Koltuğumuz cam kenarı ve uçağın kanadının hemen yanındaydı (benim favori koltuklarım 24, 25, 26, 27 ve 28. sıradakiler) ve biz 27. sıradaydık. Bol bol resim çektik bulutların üstündeyken ve uçak kanatlı olanlardan.  Lizbon’a vardığımı...

PostgreSQL High Availability - Patroni 2

Patroni kurulumuyla ilgili oldukça fazla kaynak bulunmakta fakat kurulum ve yönetimini beraber barındıran kaynağa denk gelmedim. Bu yazıda hem Patroni kurulumu hem de kurulum sonrası yönetimiyle alakalı detaylara ulaşabilirsiniz. PostgreSQL cluster'larının yönetimi için kullanılan Patroni ile ilgili temel bilgilerin yer aldığı Autofailover üzerine hazırladığım yazı serisine aşağıdaki linklerden erişebilirsiniz. PostgreSQL ve Autofailover PostgreSQL'de Autofailover ve Patroni 1 (Giriş) PostgreSQL'de Autofailover ve Patroni 2 (Kurulum, Konfigürasyon ve Yönetim) PostgreSQL'de Autofailover ve Patroni 3 (Mevcut PostgreSQL Cluster'inin Patroni'ye Geçirilmesi) Patroni, PostgreSQL veritabanlarının kurulumundan ve konfigürasyonundan sorumludur. Yani Patroni'yi kurduğumuz sunucular aynı zamanda Patroni ile kurulmuş PostgreSQL'leri barındıracak. Üç node'lu PostgreSQL ve üç node'lu ETCD cluster'larını oluşturacağım. Kuruluma önce üç no...

ERROR: pg_stop_backup still waiting for all required WAL segments to be archived

Hi, This error mention that WAL Segments can not be archived, so you need to check archive_command is right to archive WAL.  NOTICE: pg_stop_backup cleanup done, waiting for required WAL segments to be archived  WARNING: pg_stop_backup still waiting for all required WAL segments to be archived (60 seconds elapsed)  HINT: Check that your archive_command is executing properly. pg_stop_backup can be cancelled safely, but the database backup will not be usable without all the WAL segments. archive_command can be as bellow row in your postgres.conf file; archive_command = '/bin/cp %p /var/lib/pgsql/archive/%f' the most important thing is if there is a directory for /var/lib/pgsql/archive/%f side. Check it out and reload your config file or restart your Postgresql server. Loves,