Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare
- l_need_comma boolean := false;
- begin
- -- Create "dictionary" arrays:
- -- deptDic for Departments
- -- They are used for the populating the Select2 items
- -- that already have codes and avoid an extra AJAX call for each one.
- sys.htp.p('<script>');
- sys.htp.prn('var shipDic={');
- for d in (
- select d.item_shtname as description,
- d.item_code as code
- from lgms_lov_v d
- where upper(lov_code) = 'SHIPS'
- order by 1
- )
- loop
- if l_need_comma then
- sys.htp.prn(',');
- else
- l_need_comma := true;
- end if;
- sys.htp.prn(d.code || ':"' || replace(d.description, '"','\"') || '"');
- end loop;
- sys.htp.p('};');
- sys.htp.p('</script>');
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement