Select all values from Rule in Store Procedure
Hi
I have a rule like this
CREATE RULE [dbo].[Rle_Currency_Lst]
AS
@List IN
('PKR','USD')
GO
Now i want to make simple "Currency List" report for which i need to select values from above rule in Store Procedure which i will use in SSRS to fill my report.
Please help
Zubair Afridi | Please mark as answered or vote helpful if this post help resolved your issue. Thanks!
One way to get the values.
declare @definition nvarchar(max);
select @definition = m.definition
from sys.objects o
inner join sys.sql_modules m on o.object_id = m.object_id
where schema_name(o.schema_id) = 'dbo' and o.name = 'Rle_Currency_Lst';
set @definition = SUBSTRING(@definition, CHARINDEX('''', @definition), LEN(@definition));
set @definition = LEFT(@definition, CHARINDEX(')', @definition) - 1);
declare @myXML AS XML;
set @myXML = N'<H><r>' + REPLACE(SUBSTRING(@definition, CHARINDEX('''', @definition), LEN(@definition)), ',', '</r><r>') + '</r></H>'
declare @result table(myvalues nvarchar(100));
insert @result(myvalues)
SELECT Vals.id.value('.', 'NVARCHAR(100)') AS val
FROM @myXML.nodes('/H/r') AS Vals(id)
update @result set myvalues = REPLACE(myvalues, '''', '');
select * from @result;
Note that rules is a deprecated feature and will be removed in a future version of SQL Server. The replacement for rules is CHECK CONSTRAINTS. You may well want to consider a plan to migrate your current rules to check constraints.
Tom
Similar Messages
-
Select all values from field in LOV
I need to create a LOV in Discoverer that works as follows: I have 4 values in a dimension, but I want the user could select another value, something as 'all'. This value includes the values in the dimension table and any other value in the relationed fields.
For example, I have four values, A,B,C and D. But I want to add another value, 'All' that matches this four values as any other one. How can I do that?
Thanks in advance.Hi Javier,
When you create a parameter, you have the option to let the user to enter multiple values. Therefore, if you have a LOV, the user can select one or multiple or all values.
Regards,
John -
Store all values from updateable report on clientside for later use
apex 4.2 , 11xe
hello,
it is possible to store all values from an updateable report to something like an cache BEFORE sent it to DB ?
Background:
i have an modified updateable report ,look the jpg
http://www10.pic-upload.de/25.06.13/3zq5wr23awwg.jpg
updateable report have ever 29 rows. as example i make time entrys for an employee. very often the next employee have the same timeentrys. now iam thinking about to make the entrys for the first employee, then click a button to store the values from ALL cells into somting like a javascript cache or jquery.data() . when i pull another employee from lov i have a fresh empty report( with 29 rows) and now i want to call the data back from cache to the cells (with another button). the cache shouldnt be destroyed when refresh the page,cause there is a page refresh when pull another employee from lov.
is it possible to store all cell values(empty or not) from report all in one?
what is the best and simplest way ?
good would be an example for the code or method i should use.
or is somthing inside apex i could use for that. i looked in apex.api but didnt found something.
my report based on a view with iof trigger and apex collection.
greets/christianthx for answer jarola and sorry for my bad english.
apex collection will not work.
let me explain why not and i think something like javascript/jquery is better for that.
there is a table MAZEIT and i have this updateable report. when i select an employee from lov, a collection will be created. the collection look in MAZEIT ,perhaps there are real timeentrys, in this case the collection will be modified and give me 29 rows,some are filled. or there are no real entrys and the collection give me 29 empty rows.
here my report sql:
select
"HID_SEQ_ID",
"DATUM",
"WOTAG",
"WOTAGNR",
"KNDABT_ID",
"ZEIT",
"BEGINN",
"ENDE",
"PAUSE",
"ZUSCHLAG",
"BEM",
"MELDUNG"
from "#OWNER#"."V_COLL_MAZEIT"
here the v_coll_mazeit (view) sql
CREATE OR REPLACE VIEW V_COLL_MAZEIT AS
SELECT seq_id HID_SEQ_ID -- APEX_COLLECTIONS.SEQ_ID
,C001 HID_MAZEIT_ID -- MAZEIT.ID
,C002 DATUM -- Datum DD.MM.YYYY
,C003 WOTAG -- Wochentag Mo/Di/...
,C004 WOTAGNR -- Wochentag 1/2/...
,C005 KNDABT_ID -- Abteilung
,C006 ZEIT -- Zeit in HH24:MI
,C007 BEGINN -- Beginn in HH24:MI
,C008 ENDE -- Ende in HH24:MI
,C009 PAUSE -- Pause in HH24:MI
,C010 ZUSCHLAG
,C011 BEM
,C040 HID_MANDANT_ID
,C041 HID_KND_ID
,C042 HID_MA_ID
,C043 HID_KW
,C048 HID_HASH4CHECK -- Hash für Check auf Änderungen MAZEIT
,C049 HID_SORTIER -- für ORDER BY hier Arbeitsbeginn
,C050 MELDUNG -- für FehlerMeldungen
FROM APEX_COLLECTIONS
WHERE COLLECTION_NAME='V_COLL_MAZEIT'
ORDER BY HID_SORTIER;
here the trigger (iof) from v_coll_mazeit
CREATE OR REPLACE TRIGGER "V_COLL_MAZEIT_IOF_U_TRG"
INSTEAD OF UPDATE ON V_COLL_MAZEIT
FOR EACH ROW
BEGIN
--RAISE_APPLICATION_ERROR(-20004,'NIX DA');
CM_MEAT.V_COLL_MAZEIT_IOF_U_TRG(
:NEW.HID_SEQ_ID
,:NEW.HID_MAZEIT_ID
,:NEW.DATUM
,:NEW.WOTAG
,:NEW.WOTAGNR
,:NEW.KNDABT_ID
,:NEW.ZEIT
,:NEW.BEGINN
,:NEW.ENDE
,:NEW.PAUSE
,:NEW.ZUSCHLAG
,:NEW.BEM
,:NEW.HID_HASH4CHECK
,:NEW.HID_SORTIER
,:NEW.MELDUNG
END V_COLL_MAZEIT_IOF_U_TRG;
and here a package procedure when i select an employee:
PROCEDURE V_COLL_MAZEIT_PROC(
iAction IN PLS_INTEGER,
iDatum IN DATE DEFAULT SYSDATE,
iMandantId IN MAZEIT.MANDANT_ID%TYPE,
iKndId IN MAZEIT.KND_ID%TYPE,
iMaId IN MAZEIT.MA_ID%TYPE,
oCollName OUT VARCHAR2)
IS
TK_FUNC_NAME CONSTANT USER_OBJECTS.OBJECT_NAME%TYPE := 'V_COLL_MAZEIT_PROC';
TK_COLL_NAME CONSTANT APEX_COLLECTIONS.COLLECTION_NAME%TYPE := 'V_COLL_MAZEIT';
TK_MD5 CONSTANT VARCHAR2(2) := 'NO';
TYPE t_Tage_TAB IS TABLE OF DATE INDEX BY BINARY_INTEGER;
TYPE t_TageVC_TAB IS TABLE OF VARCHAR2(8) INDEX BY BINARY_INTEGER;
TYPE t_TageI_TAB IS TABLE OF PLS_INTEGER INDEX BY BINARY_INTEGER;
tTage t_Tage_TAB;
tTageVC t_TageVC_TAB;
tTageI t_TageI_TAB;
vDatum DATE;
vDatumCh VARCHAR2(8);
vKW4Db MAZEIT.KW%TYPE;
vI PLS_INTEGER := 0;
vAnz PLS_INTEGER := 0;
BEGIN
FOR rec IN (SELECT * FROM NLS_SESSION_PARAMETERS)
LOOP
InsProto(rec.PARAMETER||'=['||rec.VALUE||']',
QK_PACK_NAME,TK_FUNC_NAME);
END LOOP;
CMT.InsProto('iAction='||iAction||', iDatum='||iDatum||', iMandantId='||iMandantId||', iKndId='||iKndId||', iMaId'||iMaId,
QK_PACK_NAME,TK_FUNC_NAME);
oCollName := TK_COLL_NAME;
IF iAction=0 THEN -- löschen
IF APEX_COLLECTION.COLLECTION_EXISTS(p_collection_name=>TK_COLL_NAME) THEN
APEX_COLLECTION.TRUNCATE_COLLECTION(TK_COLL_NAME);
APEX_COLLECTION.DELETE_COLLECTION(TK_COLL_NAME);
END IF;
|| Säubern und anlegen
ELSIF iAction=1 THEN
IF APEX_COLLECTION.COLLECTION_EXISTS(p_collection_name=>TK_COLL_NAME) THEN
APEX_COLLECTION.TRUNCATE_COLLECTION(p_collection_name=>TK_COLL_NAME);
ELSE
APEX_COLLECTION.CREATE_COLLECTION(p_collection_name=>TK_COLL_NAME);
END IF;
vDatum := NVL(iDATUM,SYSDATE);
vDatum := TO_DATE(TO_CHAR(vDatum,'YYYYMMDD')||'000000','YYYYMMDDHH24MISS');
vKW4Db := GetKW4Db(vDatum);
tTage(1) := CMT.GetMonday(vDATUM,0);
SELECT tTage(1) + 1DAY,tTage(1) + 2DAY,tTage(1) + 3DAY,tTage(1) + 4DAY,tTage(1) + 5DAY,tTage(1) + 6DAY
INTO tTage(2),tTage(3),tTage(4),tTage(5),tTage(6),tTage(7)
FROM DUAL;
FOR i IN 1..7 LOOP tTageI(i) := 0; tTageVC(i) := TO_CHAR(tTage(i),'YYYYMMDD'); END LOOP;
-- erste Zeile enthält Default-Werte
APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
,P_C001 => 0 -- MAZEIT.ID
,P_C002 => '<b>Vorgabe</b>' -- Datum DD.MM.YYYY
,P_C003 => ' ' -- Wochentag Mo/Di/...
,P_C004 => ' ' -- Wochentag 1/2/...
,P_C005 => 0 -- MAZEIT.KNDABT_ID
,P_C006 => NULL -- Zeit in HH24:MI
,P_C007 => NULL -- Beginn in HH24:MI
,P_C008 => NULL -- Ende in HH24:MI
,P_C009 => NULL -- Pause in HH24:MI
,P_C010 => NULL -- Zuschlag
,P_C011 => NULL -- Bem
,P_C040 => iMandantId
,P_C041 => iKndId
,P_C042 => iMaId
,P_C043 => vKW4Db
,P_C048 => '-1' -- Hash für Check auf Änderungen MAZEIT
,P_C049 => ' ' -- für ORDER BY hier Arbeitsbeginn
,P_C050 => NULL
FOR rec IN (SELECT z.*,
TO_CHAR(DBMS_UTILITY.get_hash_value(
z.id||'|'||
z.mandant_id||'|'||
z.majob_id||'|'||
z.ma_id||'|'||
z.knd_id||'|'||
z.kndabt_id||'|'||
z.kw||'|'||
z.arb_beg||'|'||
z.arb_end||'|'||
z.zeit||'|'||
z.pause||'|'||
z.zuschlag||'|'||
z.stk_anz||'|'||
z.stk_kg||'|'||
z.stk_gemuur||'|'||
z.stk_bezahlt||'|'||
z.bem||'|'||
z.ART4RECH
,1,POWER(2,30))) AS HID_HASH4CHECK
FROM MAZEIT z
WHERE z.MANDANT_ID=iMandantId AND
z.KND_ID=iKndId AND
z.MA_ID=iMaId AND
z.KW = GetKW4Db(tTage(1)) AND
z.ART4RECH IN (CMT.GetTCVNum('MAZEIT_ART4RECH_STD'),CMT.GetTCVNum('MAZEIT_ART4RECH_STK'),CMT.GetTCVNum('MAZEIT_ART4RECH_KG'))
ORDER BY z.ARB_BEG)
LOOP
IF rec.ZUSCHLAG=0 THEN
rec.ZUSCHLAG := NULL;
END IF;
vI := 0;
vDatumCh := TO_CHAR(rec.ARB_BEG,'YYYYMMDD');
FOR i IN 1..7 LOOP
IF tTageVC(i)=vDatumCh THEN
tTageI(i) := tTageI(i) + 1;
vI := i;
EXIT;
END IF;
END LOOP;
-- Stücklohn kommt an den Anfang der Bemerkung gekennzeichnet mit QK_COLL_MAZEIT_STK_KZ ursprüngliche Bemekuung nach dem :
rec.BEM := RTRIM(rec.BEM);
IF rec.ART4RECH = CMT.GetTCVNum('MAZEIT_ART4RECH_STK') THEN
DECLARE
vBem MAZEIT.BEM%TYPE := QK_COLL_MAZEIT_STK_KZ;
BEGIN
IF rec.STK_BEZAHLT > 0. THEN
vBem := QK_COLL_MAZEIT_STK_KZ||TO_CHAR(rec.stk_bezahlt,'FM9999D00');
ELSIF rec.STK_ANZ > 0 THEN
vBem := QK_COLL_MAZEIT_STA_KZ||TO_CHAR(rec.stk_anz,'FM9999');
END IF;
IF rec.BEM IS NULL THEN
rec.BEM := vBem;
ELSE
rec.BEM := SUBSTR(vBem||':'||rec.BEM,1,CMT.GetColLen('MAZEIT','BEM'));
END IF;
END;
ELSIF rec.ART4RECH = CMT.GetTCVNum('MAZEIT_ART4RECH_KG') THEN
DECLARE
vBem MAZEIT.BEM%TYPE := QK_COLL_MAZEIT_KG_KZ;
BEGIN
IF rec.STK_KG > 0. THEN
vBem := QK_COLL_MAZEIT_KG_KZ||TO_CHAR(rec.stk_kg,'FM999999D000');
END IF;
IF rec.BEM IS NULL THEN
rec.BEM := vBem;
ELSE
rec.BEM := SUBSTR(vBem||':'||rec.BEM,1,CMT.GetColLen('MAZEIT','BEM'));
END IF;
END;
END IF;
IF vI>0 THEN
IF tTageI(vI)=1 THEN
APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
,P_C001 => rec.id -- MAZEIT.ID
,P_C002 => TO_CHAR(rec.ARB_BEG,'DD.MM.YYYY') -- Datum DD.MM.YYYY
,P_C003 => CMT.WoTag(rec.ARB_BEG) -- Wochentag Mo/Di/...
,P_C004 => CMT.WoTagNr(rec.ARB_BEG) -- Wochentag 1/2/...
,P_C005 => rec.KNDABT_ID -- MAZEIT.KNDABT_ID
,P_C006 => CMT.Minuten2InduZeit(rec.ZEIT) -- Zeit als InduZeit in HH24,MI
,P_C007 => TO_CHAR(rec.ARB_BEG,'HH24:MI') -- Beginn in HH24:MI
,P_C008 => TO_CHAR(rec.ARB_END,'HH24:MI') -- Ende in HH24:MI
,P_C009 => CMT.Minuten2HHMI(rec.PAUSE,TRUE) -- Pause in HH24:MI
,P_C010 => rec.ZUSCHLAG
,P_C011 => rec.BEM
,P_C040 => iMandantId
,P_C041 => iKndId
,P_C042 => iMaId
,P_C043 => vKW4Db
,P_C048 => rec.HID_HASH4CHECK -- Hash für Check auf Änderungen MAZEIT
,P_C049 => TO_CHAR(rec.ARB_BEG,'YYYYMMDDHH24MI') -- für ORDER BY hier Arbeitsbeginn
,P_C050 => NULL -- für FehlerMeldungen
ELSE
APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
,P_C001 => rec.id -- MAZEIT.ID
,P_C002 => NULL -- Datum DD.MM.YYYY
,P_C003 => NULL -- Wochentag Mo/Di/...
,P_C004 => NULL -- Wochentag 1/2/...
,P_C005 => rec.KNDABT_ID -- MAZEIT.KNDABT_ID
,P_C006 => CMT.Minuten2InduZeit(rec.ZEIT) -- Zeit als InduZeit in HH24,MI
,P_C007 => TO_CHAR(rec.ARB_BEG,'HH24:MI') -- Beginn in HH24:MI
,P_C008 => TO_CHAR(rec.ARB_END,'HH24:MI') -- Ende in HH24:MI
,P_C009 => CMT.Minuten2HHMI(rec.PAUSE,TRUE) -- Pause in HH24:MI
,P_C010 => rec.ZUSCHLAG
,P_C011 => rec.BEM
,P_C040 => iMandantId
,P_C041 => iKndId
,P_C042 => iMaId
,P_C043 => vKW4Db
,P_C048 => rec.HID_HASH4CHECK -- Hash für Check auf Änderungen MAZEIT
,P_C049 => TO_CHAR(rec.ARB_BEG,'YYYYMMDDHH24MI') -- für ORDER BY hier Arbeitsbeginn
,P_C050 => NULL -- für FehlerMeldungen
END IF;
vAnz := vAnz + 1;
END IF;
END LOOP;
FOR i IN 1..7 LOOP
IF tTageI(i)<4 THEN
FOR j IN tTageI(i)+1..4 LOOP
IF j=1 THEN
APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
,P_C001 => -1 -- MAZEIT.ID
,P_C002 => TO_CHAR(tTage(i),'DD.MM.YYYY') -- Datum DD.MM.YYYY
,P_C003 => CMT.WoTag(tTage(i)) -- Wochentag Mo/Di/...
,P_C004 => CMT.WoTagNr(tTage(i)) -- Wochentag 1/2/...
,P_C005 => 0 -- MAZEIT.KNDABT_ID
--,P_C006 => Minuten2InduZeit(0) -- Zeit als InduZeit in HH24,MI
,P_C006 => NULL -- Zeit als InduZeit in HH24,MI
--,P_C007 => '06:30' -- Beginn in HH24:MI
,P_C007 => NULL -- Beginn in HH24:MI
,P_C008 => NULL -- Ende in HH24:MI
--,P_C009 => Minuten2HHMI(0) -- Pause in HH24:MI
,P_C009 => NULL -- Pause in HH24:MI
,P_C010 => NULL -- Zuschlag
,P_C011 => NULL -- Bem
,P_C040 => iMandantId
,P_C041 => iKndId
,P_C042 => iMaId
,P_C043 => vKW4Db
,P_C048 => '-1' -- Hash für Check auf Änderungen MAZEIT
,P_C049 => TO_CHAR(tTage(i),'YYYYMMDD')||'99'||TO_CHAR(j,'FM09') -- für ORDER BY hier Arbeitsbeginn
,P_C050 => NULL
ELSE -- auffüllen
APEX_COLLECTION.add_member( p_COLLECTION_name=> TK_COLL_NAME,p_generate_md5=>TK_MD5
,P_C001 => -1 -- MAZEIT.ID
,P_C002 => NULL -- Datum DD.MM.YYYY
,P_C003 => NULL -- Wochentag Mo/Di/...
,P_C004 => NULL -- Wochentag 1/2/...
,P_C005 => 0 -- MAZEIT.KNDABT_ID
--,P_C006 => Minuten2HHMI(0) -- Zeit in HH24:MI
,P_C006 => NULL -- Zeit in HH24:MI
--,P_C007 => '06:30' -- Beginn in HH24:MI
,P_C007 => NULL -- Beginn in HH24:MI
,P_C008 => NULL -- Ende in HH24:MI
--,P_C009 => Minuten2InduZeit(0) -- Pause als InduZeit in HH24,MI
,P_C009 => NULL -- Pause als InduZeit in HH24,MI
,P_C010 => NULL -- Zuschlag
,P_C011 => NULL -- Bem
,P_C040 => iMandantId
,P_C041 => iKndId
,P_C042 => iMaId
,P_C043 => vKW4Db
,P_C048 => '-1' -- Hash für Check auf Änderungen MAZEIT
,P_C049 => TO_CHAR(tTage(i),'YYYYMMDD')||'99'||TO_CHAR(j,'FM09') -- für ORDER BY hier Arbeitsbeginn
,P_C050 => NULL
END IF;
END LOOP;
END IF;
END LOOP;
vI := 0;
FOR rec IN (SELECT * FROM V_COLL_MAZEIT) LOOP
vI := vI + 1;
CMT.InsProto('i='||LPAD(TO_CHAR(vI),3,' ')||':'||
rec.hid_seq_id||'|'||
rec.hid_mazeit_id||'|'||
rec.datum||'|'||
rec.wotag||'|'||
rec.wotagnr||'|'||
rec.zeit||'|'||
rec.beginn||'|'||
rec.ende||'|'||
rec.pause||'|'||
rec.zuschlag||'|'||
rec.bem||'|'||
rec.hid_hash4check||'|'||
rec.hid_sortier||'|'||
rec.meldung
,QK_PACK_NAME,TK_FUNC_NAME);
END LOOP;
ELSE
raise_Application_ERROR(-20100,'kann ich doch nicht Action='||TO_CHAR(iAction));
END IF;
END V_COLL_MAZEIT_PROC;
and here the procedure (look for real entrys in table)
PROCEDURE V_COLL_MAZEIT_IOF_U_TRG(
iHID_SEQ_ID apex_collections.seq_id%TYPE
,iHID_MAZEIT_ID apex_collections.C001%TYPE
,iDATUM apex_collections.C002%TYPE
,iWOTAG apex_collections.C003%TYPE
,iWOTAGNR apex_collections.C004%TYPE
,iKNDABT_ID apex_collections.C005%TYPE
,iZEIT apex_collections.C006%TYPE
,iBEGINN apex_collections.C007%TYPE
,iENDE apex_collections.C008%TYPE
,iPAUSE apex_collections.C009%TYPE
,iZUSCHLAG apex_collections.C010%TYPE
,iBEM apex_collections.C011%TYPE
,iHID_HASH4CHECK apex_collections.C048%TYPE
,iHID_SORTIER apex_collections.C049%TYPE
,iMELDUNG apex_collections.C050%TYPE
IS
PRAGMA AUTONOMOUS_TRANSACTION;
TK_FUNC_NAME CONSTANT USER_OBJECTS.OBJECT_NAME%TYPE := 'V_COLL_MAZEIT_IOF_U_TRG';
TK_COLL_NAME CONSTANT APEX_COLLECTIONS.COLLECTION_NAME%TYPE := 'V_COLL_MAZEIT';
vRcString VARCHAR2(2000) := NULL;
rCollMaZeit0 V_COLL_MAZEIT%ROWTYPE;
rCollMaZeit V_COLL_MAZEIT%ROWTYPE;
rMaZeit MAZEIT%ROWTYPE;
vHash4Check PLS_INTEGER;
vURow ROWID;
BEGIN
CMT.InsProto(
ihid_seq_id||'|'||
ihid_mazeit_id||'|'||
idatum||'|'||
iwotag||'|'||
iwotagnr||'|'||
iKNDABT_ID||'|'||
izeit||'|'||
ibeginn||'|'||
iende||'|'||
ipause||'|'||
izuschlag||'|'||
ibem||'|'||
ihid_hash4check||'|'||
ihid_sortier||'|'||
imeldung
,QK_PACK_NAME,TK_FUNC_NAME);
-- VIEW-ZeitZeile lesen
SELECT t.* INTO rCollMaZeit
FROM V_COLL_MAZEIT t
WHERE t.HID_SEQ_ID = iHID_SEQ_ID;
IF iHID_MAZEIT_ID!=rCollMaZeit.HID_MAZEIT_ID OR
iHID_HASH4CHECK!=rCollMaZeit.HID_HASH4CHECK THEN
vRcString := 'Daten seit Anzeige verändert';
GOTO MARK_TRANSEND;
END IF;
-- VIEW-ZeitDefaultZeile setzen
IF rCollMaZeit.HID_MAZEIT_ID=0 THEN
--,P_C005 => 0 -- MAZEIT.KNDABT_ID
--,P_C006 => NULL -- Zeit in HH24,MI
--,P_C007 => NULL -- Beginn in HH24:MI
--,P_C008 => NULL -- Ende in HH24:MI
--,P_C009 => NULL -- Pause in HH24,MI
--,P_C010 => NULL -- Zuschlag
--,P_C011 => NULL -- Bem
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>5, p_attr_value=>iKNDABT_ID);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>6, p_attr_value=>iZEIT);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>7, p_attr_value=>iBEGINN);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>8, p_attr_value=>iENDE);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>9, p_attr_value=>iPAUSE);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>10, p_attr_value=>iZUSCHLAG);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>11, p_attr_value=>iBEM);
IF iBEM LIKE '#%' THEN -- Verteilen
-- VIEW-ZeitDefaultZeile lesen
SELECT t.* INTO rCollMaZeit0
FROM V_COLL_MAZEIT t
WHERE t.HID_MAZEIT_ID = 0;
rCollMaZeit0.BEM := SUBSTR(iBEM,2);
DECLARE
vAnz PLS_INTEGER := 0;
nVert MAZEIT.ZEIT%TYPE;
nZeitMinuten MAZEIT.ZEIT%TYPE;
nDiffMinuten MAZEIT.ZEIT%TYPE;
BEGIN
SELECT NVL(COUNT(*),0) INTO vAnz
FROM V_COLL_MAZEIT t
WHERE t.HID_MAZEIT_ID = -1 AND
t.DATUM IS NOT NULL AND
t.WOTAGNR IN ('1','2','3','4','5'); -- nur Mo-Fr
IF vAnz<=0 THEN
vRcString := 'Verteilen nicht möglich keine freien Tage gefunden';
ELSIF TRIM(iZEIT) IS NULL OR TRIM(iZEIT) IN ('00,00','0,00','0',',00',',0','0,','0,0') THEN
vRcString := 'Verteilen von Null Minuten nicht möglich';
ELSE
nDiffMinuten := 0;
nZeitMinuten := CMT.InduZeit2MinutenNum(TRIM(iZEIT));
IF nZeitMinuten>(vAnz*1440) THEN
vRcString := 'Zu verteilende Zeit zu groß';
ELSIF vAnz>1 THEN
nVert := FLOOR(nZeitMinuten/vAnz);
nDiffMinuten := nZeitMinuten - (nVert*vAnz);
nZeitMinuten := nVert;
END IF;
IF vRcString IS NULL THEN
FOR rec IN (SELECT t.* INTO rCollMaZeit
FROM V_COLL_MAZEIT t
WHERE t.HID_MAZEIT_ID = -1 AND
t.DATUM IS NOT NULL AND
t.WOTAGNR IN ('1','2','3','4','5')) -- nur Mo-Fr)
LOOP
rCollMaZeit := rec;
vRcString := qV_COLL_MAZEIT_Insert(iKNDABT_ID, iZEIT, nZeitMinuten+nDiffMinuten, iBEGINN, iENDE, iPAUSE, iZUSCHLAG, SUBSTR(iBEM,2),
rCollMaZeit0, rCollMaZeit, rMaZeit);
IF vRcString IS NOT NULL THEN
EXIT;
END IF;
nDiffMinuten := 0;
END LOOP;
END IF;
END IF;
END;
END IF;
-- MAZEIT-Vorhandener Eintrag
ELSIF rCollMaZeit.HID_MAZEIT_ID>0 THEN
SELECT z.ROWID, TO_CHAR(DBMS_UTILITY.get_hash_value(
z.id||'|'||
z.mandant_id||'|'||
z.majob_id||'|'||
z.ma_id||'|'||
z.knd_id||'|'||
z.kndabt_id||'|'||
z.kw||'|'||
z.arb_beg||'|'||
z.arb_end||'|'||
z.zeit||'|'||
z.pause||'|'||
z.zuschlag||'|'||
z.stk_anz||'|'||
z.stk_kg||'|'||
z.stk_gemuur||'|'||
z.stk_bezahlt||'|'||
z.bem||'|'||
z.ART4RECH
,1,POWER(2,30))) AS HID_HASH4CHECK
INTO vURow, vHash4Check
FROM MAZEIT z
WHERE z.ID=rCollMaZeit.HID_MAZEIT_ID
FOR UPDATE NOWAIT;
IF vHash4Check!=rCollMaZeit.HID_HASH4CHECK THEN
vRcString := 'Daten seit Anzeige verändert';
GOTO MARK_TRANSEND;
END IF;
SELECT z.* INTO rMaZeit
FROM MAZEIT z
WHERE ROWID=vURow;
rMaZeit.KNDABT_ID := TO_NUMBER(TRIM(iKNDABT_ID));
IF TRIM(iBEGINN) IS NULL THEN
rMaZeit.ARB_BEG := NULL;
ELSE
rMaZeit.ARB_BEG := TO_DATE(TO_CHAR(rMaZeit.ARB_BEG,'YYYYMMDD')||TRIM(SUBSTR(iBEGINN,1,5)),'YYYYMMDDHH24:MI');
END IF;
IF TRIM(iENDE) IS NULL THEN
rMaZeit.ARB_END := NULL;
ELSE
rMaZeit.ARB_END := TO_DATE(TO_CHAR(rMaZeit.ARB_BEG,'YYYYMMDD')||TRIM(SUBSTR(iENDE,1,5)),'YYYYMMDDHH24:MI');
END IF;
IF TRIM(iZEIT) IS NULL THEN
rMaZeit.ZEIT := NULL;
ELSE
rMaZeit.ZEIT := CMT.InduZeit2MinutenNum(TRIM(iZEIT));
END IF;
IF TRIM(iPAUSE) IS NULL THEN
rMaZeit.PAUSE := NULL;
ELSE
rMaZeit.PAUSE := CMT.HHMI2Minuten(TRIM(iPAUSE));
END IF;
IF iWOTAGNR IN (6,7) AND
rMaZeit.PAUSE IS NOT NULL AND rMaZeit.PAUSE<>0 THEN
vRcString := 'Eintrag Pause am Wochenende nicht erlaubt';
GOTO MARK_TRANSEND;
END IF;
IF TRIM(iZUSCHLAG) IS NULL THEN
rMaZeit.ZUSCHLAG := NULL;
ELSE
rMaZeit.ZUSCHLAG := TO_NUMBER(TRIM(iZUSCHLAG));
END IF;
IF RTRIM(iBEM) IS NULL THEN
rMaZeit.BEM := NULL;
ELSE
rMaZeit.BEM := RTRIM(iBEM);
END IF;
IF (rMaZeit.KNDABT_ID IS NOT NULL AND rMaZeit.KNDABT_ID>0) OR
rMaZeit.ARB_BEG IS NOT NULL OR rMaZeit.ARB_END IS NOT NULL OR
(rMaZeit.ZEIT IS NOT NULL AND rMaZeit.ZEIT!=0) OR rMaZeit.PAUSE IS NOT NULL OR
rMaZeit.ZUSCHLAG IS NOT NULL OR rMaZeit.BEM IS NOT NULL THEN
DECLARE
vBem MAZEIT.BEM%TYPE := rMaZeit.BEM;
BEGIN
rMaZeit.ZUSCHLAG := NVL(rMaZeit.ZUSCHLAG,0.0);
qV_COLL_MAZEIT_BEM_CHK(rMaZeit); -- Bem prüfen wg. ART4RECH Verschlüsselung mittels QK_COLL_MAZEIT_STK_KZ
UPDATE MAZEIT z
SET z.KNDABT_ID = rMaZeit.KNDABT_ID
,z.ARB_BEG = rMaZeit.ARB_BEG
,z.ARB_END = rMaZeit.ARB_END
,z.ZEIT = rMaZeit.ZEIT
,z.PAUSE = rMaZeit.PAUSE
,z.ZUSCHLAG = rMaZeit.ZUSCHLAG
,z.BEM = rMaZeit.BEM
,z.STK_BEZAHLT = rMaZeit.STK_BEZAHLT
,z.STK_ANZ = rMaZeit.STK_ANZ
,z.STK_KG = rMaZeit.STK_KG
,z.ART4RECH = rMaZeit.ART4RECH
WHERE ROWID=vURow;
IF SQL%ROWCOUNT=1 THEN
NULL;
ELSIF SQL%ROWCOUNT<1 THEN
RAISE NO_DATA_FOUND;
ELSE
RAISE TOO_MANY_ROWS;
END IF;
rMaZeit.BEM := vBem;
END;
ELSE
DELETE FROM MAZEIT z
WHERE ROWID=vURow;
IF SQL%ROWCOUNT=1 THEN
NULL;
ELSIF SQL%ROWCOUNT<1 THEN
RAISE NO_DATA_FOUND;
ELSE
RAISE TOO_MANY_ROWS;
END IF;
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>1, p_attr_value=>-1);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>48, p_attr_value=>'-1');
END IF;
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>5, p_attr_value=>rMaZeit.KNDABT_ID);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>6, p_attr_value=>CMT.Minuten2InduZeit(rMaZeit.ZEIT));
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>7, p_attr_value=>TO_CHAR(rMaZeit.ARB_BEG,'HH24:MI'));
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>8, p_attr_value=>TO_CHAR(rMaZeit.ARB_END,'HH24:MI'));
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>9, p_attr_value=>CMT.Minuten2InduZeit(rMaZeit.PAUSE,TRUE) );
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>10, p_attr_value=>rMaZeit.ZUSCHLAG);
APEX_COLLECTION.update_member_attribute( p_COLLECTION_name=> TK_COLL_NAME, p_seq=>rCollMaZeit.HID_SEQ_ID
,p_attr_number=>11, p_attr_value=>RTRIM(rMaZeit.BEM));
-- MAZEIT neuer Eintrag
ELSIF rCollMaZeit.HID_MAZEIT_ID=-1 THEN
-- VIEW-ZeitDefaultZeile lesen
SELECT t.* INTO rCollMaZeit0
FROM V_COLL_MAZEIT t
WHERE t.HID_MAZEIT_ID = 0;
vRcString := qV_COLL_MAZEIT_Insert(iKNDABT_ID, iZEIT, NULL, iBEGINN, iENDE, iPAUSE, iZUSCHLAG, iBEM,
rCollMaZeit0, rCollMaZeit, rMaZeit);
ELSE
vRcString := 'Ungültige HID_MAZEIT_ID '||TO_CHAR(rCollMaZeit.HID_MAZEIT_ID);
END IF;
<<MARK_TRANSEND>>
IF vRcString IS NULL THEN
COMMIT;
ELSE
ROLLBACK;
RAISE_APPLICATION_ERROR(-20100,vRcString);
END IF;
END V_COLL_MAZEIT_IOF_U_TRG;
and in end there are 3 other procedures, all for table MAZEIT, the collection and and the report.
in princip its a good idea,to create another collection, but difficult to bind it to the report TOO,cause my "cell-fill- functionality" is to complicated.
my idea is another: to look with javascript/jquery whatever on clientside the cell-values. and only the editable cells. not the hidden cells.there would be ca. 180 editable cells. i want store the values from this cells all in one in a cache (clientside! ).
then select next employee (collection will be created with view ect.) and give me this 29 rows. in this moment i have cells with ID f02_0001 as example and can use the cache values with that. the ID's ever the same,cause i have ever 29 rows.
greets/christian -
How can i get all values from jtable with out selecting?
i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
thanks in advance.
rajaYou could set the table's data model to be the same:
output2.setModel( output1.getModel() ); -
How to get all values from an interval using select statement
Hi,
Is it possible to write a select statement that returns all values from an interval? Interval boundaries are variable.
something like this:
select (for x in 1,1024 loop x end loop) from dual
(this, of course, doesn't work)
The result in this example should be 1024 rows of numbers from 1 to 1024. These numbers are parameters, so it is not possible to create a table with predefined values.
Thanks in advance for your help,
Mia.For your simple case, with a lower boundary of 1, you can use:
SELECT rownum
FROM all_objects
WHERE rownum <= 1024For a set of number between say 50 - 100, you can use something like:
SELECT rownum + (50 - 1)
FROM all_objects
WHERE rownum <= (100 - 50 + 1)Note, that all_objects was used only because it generally has a lot of rows. Any table with at least the number of rows in your range will work.
TTFN
John -
I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. Can I fix this?
I'm fairly new to this, but I think it has to do with the way you have the drop downs named. Did you copy one then keep pasting it in each field? If so, that is the problem. You should rename each one with a different number: Dropdown1, Dropdown2, etc. I think that might solve the issue.
-
Custom Rule - Problem in passin values From Rule Container to WF Container?
Hi Guys,
I am having hard time passing values back from my custom rule. I have created a custom rule to determine the agents in PFAC which takes in the Person number as import element of container. It determines the Manager as agent and I am passing Managers Person Number back to workflow. If he dont approve the Request then it will be passed to his boss. In this case I will pass this imported Mangers Person number back to rule so that his boss will be determined as agent. I have created ZRULE function module. I am passing value back from Rule container to Workflow Container using following code.
swc_set_element ac_container 'SUPERPERNR' lf_super_pernr.
I have created a element SUPERPERNR on rule container and workflow container as well .The problem is in the Rule container I am not able to create SUPERPERNR as export parameter. The tick mark is grayed out and there is no option for setting it as export.
My question is do I have create a Export element on Rule container or Not? If i just write the code
( swc_set_element ac_container 'SUPERPERNR' lf_super_pernr ) will it set the value in WF container? In my case it is not setting. I have to bind the values from rule container to WF container and if My rule container element is not allowing me to click the tick mark as export how can i pass value of of rule container back to WF Container?
Please help me guys.
Thanks,
Manish.Hi Manish,
Same scenario I have developed in my system. This all steps I did in my system.
1) Created a Z function module which takes import parameter (Parameter name = 'EMP') in the
format 'US100123'.
2) This in turn fetches back the supevisor or boss as an export parameter (Parameter name = 'BOSS') in
the format 'US100245'.
3) This function module is attached to a BUS object(SWO1).
4) While attaching this function module to BUS object you need not do any manual coding it is done
automatically.
5) Implement, release and generate this BUS object.
6) Create a new variable in your workflow (Parameter name = 'ZSUPERVISOR') for storing the value
which is returned by the Z method.
7) Create a new task.
8) Put in your BUS object name, then your Z method name, select background processing checkbox.
9) Press save, it will ask for transfer of missing elements, select yes.
10) Then you will see a green button below your Z method name click on it.
11) Top portion contains your Z method variables, below to it you have the import parameter window in
this window you should have &EMP& -> &EMP&., below to import parameter window you have
export parameter window in this window you should have &BOSS& <- &BOSS&. (This is method
binding).
12) Now click on enter button then click on back button it will generate the task binding automatically
just press yes.
13) Now click on binding exist button.
14) Here you have the Workflow container variables as well as the system container variables.
15) In the import parameter window left portion is for your workflow variables and right portion is for your
method variables. In my case i had sent workflow initiator and fetched his supervisor. The Import
parameter binding was &WF_INTIATOR& -> &EMP&. and the export parameter binding part was
&ZSUPERVISOR& <- &BOSS&.
16) Save the task and run the workflow.
Regards.
Vaibhav Patil. -
How to select several values from a user exit variable in a planning folder
Hello,
I have created a user exit variable for limiting the values only to which the user need to access.
For a simulation part, it is then necessary for him to select several values from these values (not only one, and not all)
But It seems in this case the user has only two possibilities :
- keep all the values without any restriction
- restrain the selection to only one value.
It seems possible for the user to access to a multiple choice window, but this possibility doesn't seems to work : in all tests we did, only the first value was taken into account by BPS.
If this method is not good do you know an other manner to permit the user to choice several values amongst a set of pre-selected (because the original set is too important) values ?
Thanks for your help.Hi Mayank,
Thanks for your response, but I don't think it corresponds to my problem.
I my case, I use a user exit variable to filter some data. It seems BPS offers the possibility to the user to select several values amongts the pre-selected values presented by the user exit variable, but it doesn't work. We can use a popup in which we enters the required values, but in final, only the first value is taken into account.
I don't know if it is due to a BPS bug or if it is not a good solution in regard to BPS philosophy. In this case, the concerned caracteristic isn't in the header but in lead columns.
I must present a solution to my client next monday, so I have not enough time to open an OSS message.
An alternate solution should be interesting too.
My need is to present to a user a selection of values amongst all values from an infoobject (the user exit variable seemed to be a good solution) and the user must have the possibility to select some values amongst these as filter.
Regards -
How to select multiple values from the parameters in BI Publisher report
How to select multiple values from the parameter drop down in BI Publisher, and how to handle this mulitple values from the report sql...
Hi kishore,
I have used all the steps as you mentioned in your previous reply....including checking Mulitple Selection Check Box..
Iam able to get the results when I am selecting one value..
and also I am able to handle multiple values the in the query by using IN :Parameter, but seems when we select more than one value from the parameter drop down i think the Bi Publisher is sending the values in concatenated form something ilke
ex: "'ACCOUNT','HR','SALES'" ,and when trying to display the parameters values in the output, its throwing the error as 'missing right paranthesis' ....on the whole do you have any solution which would handle
1.Single selection.
2.Multiple selection.
3.'ALL' Values.
4.Separating the concatenated string into individual strings and dispaly them on the output of the report..etc..in case of Mulitple selection.
Ex:
Concatenated String from BI Publisher:"'ACCOUNT','HR','SALES'"
Expected Output on the report:ACCOUNT,HR,SALES
reply to this would be much appreciated....
thanks,
manoj -
How to Select a value from DropDownByIndex -Urgent
Hi All,
I have dropdownbyindex UI elements in my Views, I get values from BAPI. When click records in a table, It goes to another view to display full record. Here i have dropdownbyIndexes So it should select one of appropriate value in dropdownbyindex based on record(Value) in table.
Example:
<u><i><b>In Table View</b></i></u>
id title status priority
10000 webDynPro New Low
<i><u><b>Detail View:</b></u></i>
id 10000
title webDynPro
Status New [New,Old,Open,Closed]---DropDownbyIndex
Priority Low [High,Low,Medium]---DropDownByIndex..4m BAPI
How to select Appropriate Values from DropdownbyIndex. if any one has sample code, that will be helpful.
Note: I am using Model Nodes
Thanks and Regards
Ravi GollaHi Ravi,
In details view, you will have corresponding context node created for Status and priority dropdown fields.
Let suppose, context node for Status is, StatusNode.
value attribute inside this is,
StatusNode
|_ StatusAttrib
Now, you need to write following code to set l_status ="LOW" value in it.
wdContext.nodeStatusNode().moveFirst();
for(int i=0; i<wdContext.nodeStatusNode().size(); i++)
if(wdcontext.currentStatusNodeElement().getStatusAttrib().equals(l_status)
wdContext.nodeStatusNode().setLeadselection(i);
break;
wdContext.nodeStatusNode().moveNext();
write same code for priority also.
Let me know if it is not working with you.
regards,
Bhavik -
Fetching more than one row from a table after selecting one value from the dropdown
Hi Experts,
How can we fetch more than one row from a table after selecting one value from the dropdown.
The scenario is that I have some entries in the dropdown like below
A B C
11256 VID 911256
11256 VID 811256
11256 SONY 11256
The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
Request your help on this.
Thanks,
Preeetam Narkhede.Hi Preetam!
I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
// Declare a private variable for your Data at the appropriate place in your code
private Hashtable temp = new Hashtable<String, ArrayList<String>>();
// Then, in the method you use to retrieve backend data and populate the dropdown,
// populate the Hashtable, too
Iterator<TableData> a = origin.iterator();
while (a.hasNext()) {
TableData current = a.next();
String b = current.getB();
String c = current.getC();
ArrayList<String> values = this.temp.get(b);
if (values == null) {
values = new ArrayList<String>();
values.add(c);
this.temp.put(b, values);
So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
VID --> (911256, 811256)
SONY --> (11256)
Use
temp.keySet()
to populate your dropdown.
After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
// In the metod you handle the selection event with, get the c value collection
//and use it to select from your other table
ArrayList<String> selectedCs = this.temp.get(selectedB);
// now iterate over the selectedCs items and use each of these
//to continue retrieving whatever data you need...
for (String oneC : selectedCs) {
// Select Data from backend using oneC in the where-Clause or whatever...
Hope that helps
Michael -
Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View
Todd,
Let me try to explain you this time. I have a text field in a TiledViewBean.
When I display the page, the text field
html tag is created with the name="PageDetail.rDetail[0].tbFieldName" say
five times/rows with same name.
The html tags look like this.
<input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
maxlength=9 size=13>
<input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
maxlength=9 size=13>
<input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
maxlength=9 size=13>
When the form is submitted, I want to get the text field values using the
method getTbFieldName().getValues() which
returns an array object[]. This is in case where my TiledViewBean is not
bound and it is working fine.
Now in case when my TiledView is bound to a model, it creates the html tags
as follows.
<input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
maxlength=9 size=13>
<input type=text name="PageDetail.rDetail[1].tbFieldName" value=""
maxlength=9 size=13>
<input type=text name="PageDetail.rDetail[2].tbFieldName" value=""
maxlength=9 size=13>
Now when I say getTbFieldName().getValues() it returns only the first
element values in the object[] and the rest of the
values are null.
May be we need to create a utility method do get these values from
requestContext.
raju.
----- Original Message -----
From: Todd Fast <toddwork@c...>
Sent: Saturday, July 07, 2001 3:52 AM
Subject: Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View
Raju.--
I wanted to know how the getValues() method works the reason being,
when the tiled view is NOT bound to a model, it populates all the
fields with the same name as some thing likeI'm afraid I don't understand your point--can you please clarify? Do you
mean "value" instead of "name"?
What are you trying to do? What behavior are you expecting but notseeing?
>
Without further clarification, I can say that the setValues() methodsNEVER
populates data on multiple rows of a (dataset) model, nor does it affect
multiple fields on the same row. Perhaps what you are seeing is theeffect
of default values. Model that derive from DefaulModel have the ability to
carry forward the values set on the first row to other rows in lieu ofdata
in those other rows. This behavior is for pure convenience and can be
turned off, and it is turned off for the SQL-based models.
Todd
[email protected]Hi,
I wanted to know how the getValues() method works the reason being,
when the tiled view is NOT bound to a model, it populates all the
fields with the same name as some thing like
PageDetail.rDetail[0].tbFieldValue
PageDetail.rDetail[0].tbFieldValue
in which case, the getValues() method works fine.
But in case where the tiled view is bound to a model, it populates
with different field names such as,
PageDetail.rDetail[0].tbFieldValue
PageDetail.rDetail[1].tbFieldValue
in this case, the getValues() doesn't work. Any soultion to this?
We are using Moko 1.1.1.
thanks in advance,
raju.
--- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
Does anyone know of is there a single method to get all values of a
display
field in a tiled view without having to iterate through all the
values ie
resetTileIndex() / nextTile() approach.
ie Something that returns an Object[] or Vector just like ND returned a
CspVector. I tried using the getValues() methods but that allways returns
a
single element array containing the first element.
(I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
creating a simple utility method to do the iteration on an arbitrary model
and build the list for you.
Todd -
How can i get the all values from the Property file to Hashtable?
how can i get the all values from the Property file to Hashtable?
ok,consider my property file name is pro.PROPERTIES
and it contain
8326=sun developer
4306=sun java developer
3943=java developer
how can i get the all keys & values from the pro.PROPERTIES to hashtable
plz help guys..............The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
InputStream is = new FileInputStream("tivoli.properties");
props.load(is); -
Selecting all data from employee where foreign key = null and show it in view
Hi guys i have view like following :
SELECT dbo.Nationality.NationalityName, dbo.Employee.DriverName, dbo.Employee.DriverID, dbo.Employee.NationalityID, dbo.Employee.ResidentNo,
dbo.Country.CountryName, dbo.Employee.CountryID, dbo.Branch.BranchName, dbo.Employee.BranchID, dbo.Employee.JoinDate,
dbo.Employee.ResignDate, dbo.Employee.HealthCarNo, dbo.Employee.JobID, dbo.Jobs.JobName, dbo.Department.DepartmentName,
dbo.Jobs.DepartmentID, dbo.Employee.PlaceIssue, dbo.Employee.Deduction, dbo.Employee.ExpireDateMedical, dbo.Employee.PolicyNumber,
dbo.Employee.Owner, dbo.Employee.Version, dbo.Employee.ExpireDateResident, dbo.Employee.Salary, dbo.Employee.SexID, dbo.Sex.SexType,
dbo.Sex.FlagSex, dbo.Employee.MiritialID, dbo.Miritial.MiritualStatus, dbo.Status.StatusType, dbo.Employee.StatusID, dbo.Employee.UnactiveReason,
dbo.Employee.BirthDate, dbo.Employee.DateToday, dbo.Employee.UserID, dbo.Employee.PassportNo, dbo.Employee.Period,
dbo.Employee.AccountNo, dbo.Employee.Bonus, dbo.Employee.AccountType, dbo.Employee.PlaceOfBirth, dbo.Employee.EmplyeeName,
dbo.Employee.ExpireDateresidentHijri, dbo.Employee.PassportDateStart, dbo.Employee.PassportDateExpire, dbo.Religon.ReligonName,
dbo.Employee.ReligonID
FROM dbo.Nationality INNER JOIN
dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID INNER JOIN
dbo.Country ON dbo.Employee.CountryID = dbo.Country.CountryID INNER JOIN
dbo.Branch ON dbo.Employee.BranchID = dbo.Branch.BranchID INNER JOIN
dbo.Jobs ON dbo.Employee.JobID = dbo.Jobs.JobID INNER JOIN
dbo.Department ON dbo.Jobs.DepartmentID = dbo.Department.DepartmentID INNER JOIN
dbo.Sex ON dbo.Employee.SexID = dbo.Sex.SexID INNER JOIN
dbo.Miritial ON dbo.Employee.MiritialID = dbo.Miritial.MiritialID INNER JOIN
dbo.Status ON dbo.Employee.StatusID = dbo.Status.StatusID INNER JOIN
dbo.Religon ON dbo.Employee.ReligonID = dbo.Religon.ReligonID
suppose i need to show all data from Employee table (NationalityName,BranchName,JobName) where
NationalityID =NULL OR BranchID=NULL OR JobID=NULL
WHAT I DO
Notes : I mean in topic(selecting all data from view not table
meaning i need to show all data in employee table by view
in case of forign key(any forign key)equal nullI think you need to change
FROM dbo.Nationality INNER JOIN
dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID
to
FROM dbo.Nationality
LEFT JOIN
dbo.Employee ON dbo.Nationality.NationalityID = dbo.Employee.NationalityID
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to check if all values from a dataset has come to an internal table
How to check if all values from a dataset has come to an internal table ?
Hi,
After OPEN DATASET statement check if sy-subrc = 0 if its success then proceed with split statement and save the dataset values into a internal table and while debugging the internal table you will find that whether all values get into internal table.
Checking sy-subrc after OPEN DATASET statement is must to fill up the values in the internal table.
For e.g.
OPEN DATASET p_inpfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
WRITE :/ 'No such input file' .
EXIT.
ELSE.
READ DATASET p_inpfile INTO loc_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
CLEAR loc2.
*Spliting fields in the file-
REPLACE ALL OCCURRENCES OF '#' IN wa_string WITH ' '.
SPLIT wa_string AT const INTO loc2-pernr
loc2-werks
loc2-persk
loc2-vdsk1.
Hope you get some idea.
Thanks,
Sakthi C
Maybe you are looking for
-
Hi, I'm Stan I got Virtual PC 7 for Mac, and I got Windows XP installed in it, etc. It seems to work fine, until I get to the desktop. Things look good, a balloon says, "Change your resolution to a bigger size," but the real problem is controlling th
-
Oarcle Lite cannot subtract negative numbers from date
Hello we have a very strange problem. We have a query that need to convert times between different timezones. So, we have In Oracle lite, the query select sysdate - (-60/1440) nd from dual returns sysdate + 2 - 60/1440. Whenever a negative fraction i
-
Report level filter impact on non-merged dimension
Hi Experts, I have a problem in Webi 3.1 sp4. We have three dataproviders from same universe. two dataproviders are linked with merged dimensions and third one is from independent table which has only one value (not related to other two data provide
-
CONNECT_BY_ISLEAF with Conditions
Hi, Hoping someone can assist me - have a hierarchical set-up going on a table using the whole START WITH and CONNECT BY clauses, which I am using to set-up a vertical-aligned menu system that can expand out to the right, depending if a menu option h
-
HT1349 How do I copy my playlists from one computer to another?
How do I copy my playlists from one computer to another? Both Acer.