Unable to reference items in a hashtable
HI,
I'm having a bad PowerShell day today!
My sample script to read in a text file and put the data into a hash table works just fine:
$InputFile=Get-Content C:\Out\ktf06011.REQ
$CurrentUserHashTable = @{}
ForEach ($Line in $InputFile)
$Data=$Line.Split("=")
$Label=$Data[0].Trim()
$Label=$Label.Insert(($Label.Length),"`"")
$Label=$Label.Insert(0,"`"")
$Value=$Data[1].Trim()
$Value=$Value.Insert(($Value.Length),"`"")
$Value=$Value.Insert(0,"`"")
$CurrentUserHashTable.Add($Label,$Value)
$CurrentUserHashTable
However, when I use this within a script that uses a file system watcher event to discover the presence of the text file, I cannot get anything from the hash table. I can see my variables being created, ready to pass on to the .add statement. I have found
a workaround for now - not using a hash table - but would love to know why I see this behaviour and suggestions for getting at the data.
Here is the code that I'm having trouble with.
$folder = 'c:\In'
$OutFolder = 'c:\Out'
$filter = '*.*'
$CurrentUserHashTable = $NULL
$FileSystemWatcher = New-Object IO.FileSystemWatcher $folder, $filter -Property @{IncludeSubdirectories = $false;NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite'}
Register-ObjectEvent $FileSystemWatcher Created -SourceIdentifier FileCreated -Action {
$name = $Event.SourceEventArgs.Name
$InputFile=Get-Content $folder\$name
ForEach ($Line in $InputFile)
#Write-Host $Line
$CurrentUserHashTable = @{}
$Data=$Line.Split("=")
#Write-Host "Data: " $Data
$Label=$Data[0].Trim()
$Label=$Label.Insert(($Label.Length),"`"")
$Label=$Label.Insert(0,"`"")
#Write-Host "Label: " $Label
$Value=$Data[1].Trim()
$Value=$Value.Insert(($Value.Length),"`"")
$Value=$Value.Insert(0,"`"")
#Write-Host "Value: " $Value
$CurrentUserHashTable.Add($Label,$Value)
$CurrentUserHashTable
Move-Item $folder\$name $OutFolder -Force
#Label: "ID"
#Value: "abc00001"
#Label: "PID"
#Value: "00001"
#Label: "Title"
#Value: "Mr"
#Label: "Initials"
#Value: "XY"
#Label: "Forename"
#Value: "Mickey"
#Label: "Surname"
#Value: "Mouse"
#Label: "Siteabbrev"
#Value: "UK"
#Label: "Status"
#Value: "STAFF"
#Label: "BUabbrev"
#Value: "NOBU"
#Label: "Department"
#Value: "Finance"
Note the commented bits at the bottom are the output of
Write-Host "Value: " $Value
and
Write-Host "Label: " $Label
Also, if the following are placed within the loop, I see all data items being returned, so I know that they are added to the hash table. If they are added outside the loop, I just get the final entry "Department"
Write-Host "Keys:" $CurrentUserHashTable.Keys
Write-Host "Values:" $CurrentUserHashTable.Values
Many thanks,
Jon
Rhys,
Thanks that was so obvious, I couldn't see it!
I knew the answer would be simple.
Made the amendment to my script and can now get at the data in the hashtable, via (e.g.)
$Department=$CurrentUserHashTable.'"Department"'
Thanks again.
Jon
Similar Messages
-
Unable to reference item value in report region cursor
I've worked on this for a couple of days now and cannot figure out what is going wrong. I have a report that I have created, using database links. Below is the code for my report:
declare
v_sql varchar2(32000) := null;
v_curr_sql varchar2(32000) := null;
v_full_sql varchar2(32000) := null;
cursor c1 is select distinct fiscal_year from fiscal_year where db_cc_id = v('G_DB_ID') order by 1;
begin
for r1 in c1 loop
v_curr_sql := 'sum(decode(fiscal_year,'''||r1.fiscal_year||''',visit_count,0)) as "'||r1.fiscal_year||'V", '||
'sum(decode(fiscal_year,'''||r1.fiscal_year||''',patient_count,0)) as "'||r1.fiscal_year||'P", ';
v_sql := v_sql ||v_curr_sql;
end loop;
v_full_sql := ' select name,'||v_sql||' sum(visit_count) visits, sum(patient_count) patients from visit_trends
where ehs_cc = :f109_client and visit_type = :p45_visit_type and ( (:g_fg = 0 and fg_id in (select fg_id from db_user_fg where ehs_cc = :f109_client and db_user_id = :f109_db_user_id)) or fg_id = :g_fg) group by name';
return v_full_sql;
end;
When I run the page, I get no data found. When I check my session state for the application variables, it tells me that the value for G_DB_ID is 24. If I plug in 24 to to the cursor instead of using the bind variable, it works. I've also tried the :G_DB_ID and nv('G_DB_ID') calls in the cursor. The strange thing is if I use a different bind variable (G_FG), which has a session state value of 0, it will at least return the two columns in the report not created by the sql loop. I must be able to use a bind variable in this report to make sure I'm getting the correct accounting periods for this client. I've even gone as far as to delete and recreate the page. Any suggestions?Hi Harry,
We are also facing the same issue, has the issue has been resolved. For some users we are able to select the lov and for few we are unable to select the lov but data is fetched in lov. Only select or quickselect is not working.
If so, please provide.
Regards
Raman
[email protected] -
I'm testing the waters prior to upgrading a customer application from APEX 3.0.0.00.20 to 4.0.2.00.07.
The application has been exported from the APEX 3.0 environment on a 4.0 instance on a different server. Both databases are 10.2.0.4.0 EE.
A on navigating—via a standard tab—to a page containing only conditional On Load: Before Header branches, the branches are failing with
Unexpected error, unable to find item name at application or page level.
Error: ERR-1002 Unable to find item ID for item "p810_status" in application "121". This is caused by the branch action having Set these items item names specified in lower case:
p810_status,p810_read_onlyThe error is resolved by changing these item names to UPPER CASE.
This is not a disaster. Using APEX views I can see that there are only a handful of branches specifying item names in lower case so it won't require major effort to fix this app when it's upgraded for real.
However, (a) I am aware that there are other places in this app where item names are specified in lower case; and (b) I tend to type most of my development stuff in lower case, so I'd like clarification on this issue.
<li>Is this a known issue? (Can't find any earlier mention of this on OTN, MOS or web)
<li>Is this expected behaviour in APEX 4.x or a bug?
<li>If a bug is it fixed in 4.1?
<li>Is there a change in APEX 4.0 requiring branch item (and other?) references to be uppercase? If so, where is this documented?
I notice that it works OK when the same item values are specified in the URL using lowercase item names.
Bumped by: fac586 on 08-Mar-2012 15:51
I noticed that APEX 4.0.2 has converted all branches to use the [now] late, lamented "Set value before branching" option. Is this significant? Obviously this won't occur if upgrading to 4.1.
Edited by: fac586 on 12-Mar-2012 15:14Hi Lukx,
Thank you for reporting this. You have hit upon an issue with this page, for which I have filed Oracle bug #11840642. To get around this in the meantime, you can see page specific changes by going to:
1) The 'Page Definition' page for the page you want to see recent edits.
2) Go to 'Utilities > History'. This will show you recent actions for components on the current page.
Hope that helps and thanks again for catching this.
Regards,
Anthony. -
Unable to delete items from recycle bin
Unable to delete items from my trash, it starts to delete then stops along the way, when i open the trash, its still sat there.
Relaunch the Finder, then from the Finder menu bar, select
Finder ▹ Preferences ▹ Advanced
and uncheck the box marked Empty Trash securely. Hold down the option key and try again to empty the Trash. -
Error ERR-1802 Unable to find item
I was using HTML DB to execute a query. The region expected an item and based on
that item to retrieve a Clob and output to the GUI. Here is the PL/SQL code:
begin
if :P11_X_ID is null then
return;
end if;
for x in (
select column_value
from table( query_cfile( cursor( select theClob from demo where id =
TO_NUMBER(:P11_X_ID) )
) ))loop
htp.prn(x.column_value);
end loop;
end;
When I first time ran a page I was able to get the page back without any issue;
however when I entered the second ID, I got "Error ERR-1802 Unable to find item
id "187846523855309166"
OK
Unexpected error". Then I tried running the same page on different browser
(switch from firefox to IE ) and entered the second ID I was able to get the
page back. The same problem happened for the second browser, that is, if I
entered another ID to search, I got the same error.
And I turned on the trace using p_trace=YES
grep -in err stra_ora_10201.trc
83: error_template,
205: where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY',
'NLS_SORT')
221:alter session set NLS_TERRITORY = "AMERICA"
600: process_error_message,
634: process_error_message,
873:ERROR #34:err=1 tim=2122883685
968: value="wwv_flow.find_item_err2"
979: value="wwv_flow.unexpected_err"
1038:select error_page_template
1102: value="wwv_flow.err"
1113: value="wwv_flow.err"
1304: value="wwv_flow.find_item_err2"
1315: value="wwv_flow.unexpected_err"
1358: value="wwv_flow.err"
1369: value="wwv_flow.err"
1549: value="wwv_flow.find_item_err2"
1560: value="wwv_flow.unexpected_err"
1603: value="wwv_flow.err"
1614: value="wwv_flow.err"
1818:ERROR #34:err=1 tim=2122883705
1874: value="wwv_flow.find_item_err2"
1885: value="wwv_flow.unexpected_err"
1928: value="wwv_flow.err"
1939: value="wwv_flow.err"
2143:ERROR #34:err=1 tim=2122883713
2199: value="wwv_flow.find_item_err2"
2210: value="wwv_flow.unexpected_err"
2253: value="wwv_flow.err"
2264: value="wwv_flow.err"
2757: error_template,
2879: where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY',
'NLS_SORT')
2895:alter session set NLS_TERRITORY = "AMERICA"
3274: process_error_message,
3308: process_error_message,
3575: error_message,
3582: nvl(error_display_location,'ON_ERROR_PAGE')
error_display_location
3640: value="wwv_flow.no_page_to_branch_err"
Since the error happened on Cursor #34, here I retrieved the #34 from the trace
file:
=====================
PARSING IN CURSOR #34 len=461 dep=1 uid=63 oct=2 lid=63 tim=1069307285981395
hv=698873200 ad='5bdf916c'
INSERT into wwv_flow_data (
flow_instance,
item_id,
item_element_id,
item_name,
name_length,
item_value,
session_state_status,
flow_id
) values (
:b6,
:b5,
:b4,
:b3,
length(:b3),
:b2,
'I',
:b1)
END OF STMT
PARSE #34:c=0,e=132,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=1069307285981373
BINDS #34:
bind 0: dty=2 mxl=22(21) mal=00 scl=00 pre=00 oacflg=03 oacfl2=1 size=24
offset=0
bfp=4063ffe8 bln=22 avl=11 flg=05
value=3707546874081609208
bind 1: dty=2 mxl=22(21) mal=00 scl=00 pre=00 oacflg=13 oacfl2=1 size=24
offset=0
bfp=0ae3d23c bln=22 avl=09 flg=09
value=1486322312855973
bind 2: dty=2 mxl=22(21) mal=00 scl=00 pre=00 oacflg=13 oacfl2=1 size=24
offset=0
bfp=0ae3e0d0 bln=22 avl=02 flg=09
value=1
bind 3: dty=1 mxl=32(08) mal=00 scl=00 pre=00 oacflg=13 oacfl2=1 size=32
offset=0
bfp=0ae3e13c bln=32 avl=08 flg=09
value="P11_X_ID"
bind 4: dty=1 mxl=32(08) mal=00 scl=00 pre=00 oacflg=13 oacfl2=1 size=32
offset=0
bfp=0ae3e13c bln=32 avl=08 flg=09
value="P11_X_ID"
bind 5: dty=1 mxl=128(02) mal=00 scl=00 pre=00 oacflg=13 oacfl2=1 size=128
offset=0
bfp=0adbb4e0 bln=128 avl=02 flg=09
value="57"
bind 6: dty=2 mxl=22(21) mal=00 scl=00 pre=00 oacflg=03 oacfl2=1 size=24
offset=0
bfp=4063ffc4 bln=22 avl=03 flg=05
value=105
=====================
PARSING IN CURSOR #35 len=119 dep=2 uid=0 oct=3 lid=0 tim=1069307285985274
hv=3286148528 ad='5bfee648'
select c.name, u.name from con$ c, cdef$ cd, user$ u where c.con# = cd.con# and
cd.enabled = :1 and c.owner# = u.user#
END OF STMT
PARSE #35:c=0,e=176,p=0,cr=0,cu=0,mis=0,r=0,dep=2,og=4,tim=1069307285985249
BINDS #35:
bind 0: dty=2 mxl=22(22) mal=00 scl=00 pre=00 oacflg=08 oacfl2=1 size=24
offset=0
bfp=407975e0 bln=22 avl=04 flg=05
value=32720
EXEC #35:c=0,e=514,p=0,cr=0,cu=0,mis=0,r=0,dep=2,og=4,tim=1069307285986292
FETCH #35:c=0,e=88,p=0,cr=2,cu=0,mis=0,r=0,dep=2,og=4,tim=1069307285986517
STAT #35 id=1 cnt=0 pid=0 pos=1 obj=0 op='NESTED LOOPS (cr=2 r=0 w=0 time=78
us)'
STAT #35 id=2 cnt=0 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=2 r=0 w=0 time=74
us)'
STAT #35 id=3 cnt=0 pid=2 pos=1 obj=31 op='TABLE ACCESS BY INDEX ROWID CDEF$
(cr=2 r=0 w=0 time=70 us)'
STAT #35 id=4 cnt=0 pid=3 pos=1 obj=53 op='INDEX RANGE SCAN I_CDEF4 (cr=2 r=0
w=0 time=62 us)'
STAT #35 id=5 cnt=0 pid=2 pos=2 obj=28 op='TABLE ACCESS BY INDEX ROWID CON$
(cr=0 r=0 w=0 time=0 us)'
STAT #35 id=6 cnt=0 pid=5 pos=1 obj=49 op='INDEX UNIQUE SCAN I_CON2 (cr=0 r=0
w=0 time=0 us)'
STAT #35 id=7 cnt=0 pid=1 pos=2 obj=22 op='TABLE ACCESS CLUSTER USER$ (cr=0 r=0
w=0 time=0 us)'
STAT #35 id=8 cnt=0 pid=7 pos=1 obj=11 op='INDEX UNIQUE SCAN I_USER# (cr=0 r=0
w=0 time=0 us)'
=====================
PARSING IN CURSOR #35 len=84 dep=2 uid=0 oct=3 lid=0 tim=1069307285988552
hv=2458412332 ad='5b779008'
select o.name, u.name from obj$ o, user$ u where o.obj# = :1 and o.owner# =
u.user#
END OF STMT
PARSE #35:c=0,e=142,p=0,cr=0,cu=0,mis=0,r=0,dep=2,og=4,tim=1069307285988532
BINDS #35:
bind 0: dty=2 mxl=22(22) mal=00 scl=00 pre=00 oacflg=08 oacfl2=1 size=24
offset=0
bfp=407975e0 bln=22 avl=04 flg=05
value=32720
EXEC #35:c=0,e=431,p=0,cr=0,cu=0,mis=0,r=0,dep=2,og=4,tim=1069307285989485
FETCH #35:c=0,e=187,p=0,cr=5,cu=0,mis=0,r=1,dep=2,og=4,tim=1069307285989805
STAT #35 id=1 cnt=1 pid=0 pos=1 obj=0 op='NESTED LOOPS (cr=5 r=0 w=0 time=169
us)'
STAT #35 id=2 cnt=1 pid=1 pos=1 obj=18 op='TABLE ACCESS BY INDEX ROWID OBJ$
(cr=3 r=0 w=0 time=74 us)'
STAT #35 id=3 cnt=1 pid=2 pos=1 obj=36 op='INDEX UNIQUE SCAN I_OBJ1 (cr=2 r=0
w=0 time=37 us)'
STAT #35 id=4 cnt=1 pid=1 pos=2 obj=22 op='TABLE ACCESS CLUSTER USER$ (cr=2 r=0
w=0 time=75 us)'
STAT #35 id=5 cnt=1 pid=4 pos=1 obj=11 op='INDEX UNIQUE SCAN I_USER# (cr=1 r=0
w=0 time=16 us)'
EXEC #34:c=0,e=8619,p=0,cr=8,cu=10,mis=0,r=0,dep=1,og=4,tim=1069307285991108
ERROR #34:err=1 tim=2122883685
=====================
Here is the version:
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Linux: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production
My page is very simple, it contains one region, one item, one
button (click to search).
Would you please advise what next step should be?
Thanks in advance,SQL> desc demo;
Name Null? Type
ID NOT NULL NUMBER(38)
THECLOB CLOB
The query just took the CLOB content and divided it into table of varchar2(4000) base on chr(10). The query worked well in PL/SQL when I replaced htp with dbms_output.
The branching was the default one, "Redirect To Page 11 (the same page)". I only created one region, one item and one button. That branching was automatically created.
Below was the output when I turned on the debug mode.
0.00: A C C E P T: Request=""
0.01: Fetch flow info
0.01: alter session set nls_language="AMERICAN"
0.02: alter session set nls_territory="AMERICA"
0.02: ...Setting NLS Decimal separator="."
0.02: Fetch session state from database
0.03: ...Check instance 936431675924660583 owner
0.03: ...Fetch iconbar, page, computation, process, ...
0.03: Fetch session header information
0.03: ...fetch page attributes: f105, p11
0.04: ...Check security schemes
0.04: Save form items and p_arg_values
0.05: Saved session state: 1486322312855973 "P11_X_ID" changedValue="49"
0.05: Show ERROR page...
0.06: Processing point: AFTER_ERROR_HEADER Home
Error ERR-1802 Unable to find item id "26896009627"
OK
0.07: Processing point: BEFORE_ERROR_FOOTER
Unexpected error
0.08: ...Determine if user ADMIN with SGID 504322868864112 can develop application 105 in workspace 504322868864112
Edit ApplicationEdit Page 11NewSessionNo DebugHide Edit LinksShow Edit Links
0.09: Saved session state: 26896009627 "" newValue=""
0.09: Show ERROR page...
0.10: Processing point: AFTER_ERROR_HEADER Home
Error ERR-1802 Unable to find item id "27133775492"
OK
0.11: Processing point: BEFORE_ERROR_FOOTER
Unexpected error
0.11: ...Determine if user ADMIN with SGID 504322868864112 can develop application 105 in workspace 504322868864112
Edit ApplicationEdit Page 11NewSessionNo DebugHide Edit LinksShow Edit Links
0.13: Saved session state: 27133775492 "" newValue="N"
0.13: Show ERROR page...
0.14: Processing point: AFTER_ERROR_HEADER Home
Error ERR-1802 Unable to find item id "17708687878"
OK
0.15: Processing point: BEFORE_ERROR_FOOTER
Unexpected error
0.15: ...Determine if user ADMIN with SGID 504322868864112 can develop application 105 in workspace 504322868864112
Edit ApplicationEdit Page 11NewSessionNo DebugHide Edit LinksShow Edit Links
0.16: Saved session state: 17708687878 "" newValue=" "processing of sql statements""
0.17: Show ERROR page...
0.18: Processing point: AFTER_ERROR_HEADER Home
Error ERR-1802 Unable to find item id "79615715229400664"
OK
0.19: Processing point: BEFORE_ERROR_FOOTER
Unexpected error
0.19: ...Determine if user ADMIN with SGID 504322868864112 can develop application 105 in workspace 504322868864112
Edit ApplicationEdit Page 11NewSessionNo DebugHide Edit LinksShow Edit Links
0.20: Saved session state: 79615715229400664 "" newValue="22467871247389"
0.21: Show ERROR page...
0.22: Processing point: AFTER_ERROR_HEADER Home
Error ERR-1802 Unable to find item id "187846523855309166"
OK
0.22: Processing point: BEFORE_ERROR_FOOTER
Unexpected error
0.23: ...Determine if user ADMIN with SGID 504322868864112 can develop application 105 in workspace 504322868864112
Edit ApplicationEdit Page 11NewSessionNo DebugHide Edit LinksShow Edit Links
0.24: Saved session state: 187846523855309166 "" newValue="" -
ERR-1002 Unable to find item ID for item "FB_FLOP4150_" in application 4000
I transferred my APEX Application from 11gRel1 on 10gRel2:
I exported my APEX Application from 11g (APEX 3.1.1.00.09) XDB:
Home -> Application Builder -> Application 101 -> Export Application
File Format - UNIX
File Character Set: Unicode UTF-8
I imported new APEX Application to 10gRel2 (APEX 3.1.1.00.09) Apache:
Home -> Application Builder -> Import Application
File Character Set: Unicode UTF-8
auto assign ID for Application (new ID - 101)
after opening the page to 10gRel2 get:
ERR-1002 Unable to find item ID for item "FB_FLOP4150_GOTO_PAGE" in application 4000
Help please!DAD config - NLS LANG.....
-
ERR-1002 Unable to find item ID for item "FLOW_SESSION" in application
Hi,
I installed the Tracking Issue application.
It was working fine until I ugraded HTMLDB (latest patch).
If I access it with another browser without going into htmldb development tool , it works fine.
If I clic the RUN in HTMLDB development tool and login with a valid htmldb user I now get :
ERR-1002 Unable to find item ID for item "FLOW_SESSION" in application "11964
thanks
Francis.Thanks Scott,
It works .
I find it is sometimes difficult to search in the OTN forum.
Is there a trick to be able to search on multiple words ?
Also, the results shows the same page occurence multiple times. It would be nice if it could only show it once .
(This forum should be done in HTMLDB ;) )
Thanks again.
Francis. -
ERR-1002 Unable to find item ID
Hi. can any one help me to resolve this issue
ERR-1002 Unable to find item ID for item "P801_LISTP801_NG_PO_NUMBER" in application "1000300".
Unexpected error, unable to find item name at application or page level.Hi,
That does not look like an Oracle error message (They usually start with ORA-)
http://docs.oracle.com/cd/B19306_01/server.102/b14219/toc.htm
Perhaps someone coded that inside some application?
Anyway, if you believe it to be an Oracle exception should write just a little about the situation causing this, along with a stack trace.
Regards
Peter -
ERR-1002:unable to find item id for item page_id in applicattion 103
Hi all,
I am a newbie to htmldb with ajax.
My problem is this..
when my javscript calls an on demand process like
------ var get = new htmldb_Get(null,document.getElementById('pFlowId').value,'APPLICATION_PROCESS=pull_contents',0);
-------var id_value = get_check_box_value(document.wwv_flow.f01);
-------get.add('page_id',id_value);
--------var greturn =get.get(null);
process-PULL_CONTENTS
declare
begin
owa_util.mime_header('text/xml', FALSE );
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
for rec in(select blob_content as "contents" from obe.file_subjects where id =12)
loop
htp.prn(rec.contents);
end loop;
end;
i get an error in the return text like
ERR-1002:unable to find item id FOR ITEM "PAGE_ID" IN application 103
what can be the problem?Hello,
Your going to have to reproduce it on htmldb.oracle.com, it will be much easier to help you out.
The htmldb_Get() 'is included' on every page by default unless you've done something like comment out the header section of your page template. Look at your page source you should see something like
<script src="/i/javascript/htmldb_html_elements.js" type="text/javascript"></script>
<script src="/i/javascript/htmldb_get.js" type="text/javascript"></script>
in the header section.
Make sure you page template has the #HEAD# substituion tag.
Carl -
ERR-1002 Unable to find item ID for item "SESSION"
Hi All,
We have recently ugpraded from Aoex 3.1 to 3.2 and have now noticed on occasions that i get the following error when logging in...
Unexpected error, unable to find item name at application or page level.
ERR-1002 Unable to find item ID for item "SESSION" in application "2500".
Return to application.I have been making changes to the application but have not changed anything to do with the SESSION item, i thought that was built into APEX so am not sure why it cannot find it.
The error mainly happens if i clear the internet cache and try logging in again on a new session, i click Return to Application and try logging in again but get the error. If i login as a different user it logs in.
Has this happened to anyone else?
Thanks
GrahamScott,
Sorry, typing error, i meant 3.0 to 3.1.
when a user clicks login the following happens...
A Validation runs to determine if the username and pasword is right and if the user has parts to be accepted when logging in....
DECLARE
V_User_Check VARCHAR2(800);
BEGIN
V_User_Check := M_USERS_VALIDATE_LOGIN(
:P101_USERNAME, :P101_PASSWORD, :SESSION, :P101_BENCH, :P101_BENCH_ID);
IF V_User_Check = 'PASSWORD_CHANGE' THEN
:P101_PASSWORD_CHANGE := 'YES';
RETURN 'You password must be changed for security purposes. ' ||
'Please enter and retype a new password, then confirm the ' ||
'change by entering your existing password.';
ELSIF V_User_Check = 'INVALID_USERNAME' THEN
RETURN 'The username has not been recognised, please re-enter.';
ELSIF V_User_Check = 'INVALID_PASSWORD' THEN
RETURN 'The password entered is invalid, please re-enter.';
ELSIF V_User_Check = 'ACCEPT_PARTS' THEN
:P101_PARTS_TO_ACCEPT := 'YES';
RETURN 'There are parts at this bench that need to be accepted/rejected for you to use, please check the quantities carefully.';
ELSIF V_User_Check = 'OK' THEN
RETURN '';
ELSE
RETURN V_User_Check;
END IF;
END;The following function is called from the Authentication Scheme (return authenticate_m_user;)
CREATE OR REPLACE FUNCTION authenticate_m_user(p_username IN VARCHAR2, p_password IN VARCHAR2)RETURN BOOLEAN IS
CURSOR m_cur( username_p VARCHAR,password_p VARCHAR) IS
SELECT COUNT(*) user_count FROM m_users
WHERE UPPER(username) = username_p
AND PASSWORD = password_p AND in_use = 'Y';
result_v BOOLEAN := FALSE;
V_Admin VARCHAR2(1) := 'N';
BEGIN
FOR m_rec IN m_cur(p_username, dbms_obfuscation_toolkit.md5( input_string => p_password))
LOOP
IF m_rec.user_count = 1 THEN
result_v := TRUE;
END IF;
END LOOP;
IF result_v = TRUE THEN
UPDATE m_users
SET logged_in = 'Y', last_login_date = sysdate
WHERE upper(username) = upper(p_username);
COMMIT;
END IF;
RETURN result_v;
END authenticate_m_user;Also when i encounter the error if i keep clicking Login it keeps throwing the error, but if i turn on debug and then click login again it logs in ok.
Hope this helps.
Graham. -
ERR-1002 Unable to find item ID on app 4000
Hi,
I wish have my last changes made on a page
under
Utilities>change history>Recently Edited Pages
i get this error
Unexpected error, unable to find item name at application or page level.
ERR-1002 Unable to find item ID for item "P358_PAGE_ID" in application "4000".
Return to application.
Any Help?
Thanks in advance
lukx
so win xp
rdbms 10.2.0.4
Application Express 4.0.2.00.07Hi Lukx,
Thank you for reporting this. You have hit upon an issue with this page, for which I have filed Oracle bug #11840642. To get around this in the meantime, you can see page specific changes by going to:
1) The 'Page Definition' page for the page you want to see recent edits.
2) Go to 'Utilities > History'. This will show you recent actions for components on the current page.
Hope that helps and thanks again for catching this.
Regards,
Anthony. -
ERR-1002 Unable to find item ID for item
I just started playing around with Apex 4.0.2 and I had a question which might be quite basic, so please bear with me.
I created a report and a calendar which displays the same data (from a table) in different format. I want to create a link from the calendar to the report based on the data that is being displayed in the calendar to show more details about the calendar item. In the calendar page, I created a link under Column link and did the following:
SET these items: P2_START_DATE
With these values: 10-Dec-2010
When I click on the link from the Calendar page, it gives me the following error:
Error ERR-1002 Unable to find item ID for item "P2_START_DATE" in application "100"
The Report attribute START_DATE does exist in the Page 2.
How do I accomplish this ? Any help will be greatly appreciated.
Thanks and Happy Holidays !Hi agopalan,
Actually the use of "Px_" is just a convention - but a very good convention to follow. You could name that item P7_START_DATE, MY_START_DATE or any other valid name and ApEx will still know it belongs to page 2 - but please don't do that!
You mention you have a report attribute START_DATE - do you mean a report column? If so, you can't set the START_DATE report column to a value - it isn't an item.
If you want the report to show details based on the calendar link clicked:
1) Create a hidden item called P2_START_DATE.
2) Include :P2_START_DATE in the WHERE clause of your report's SQL in whatever way you need to limit the report rows.
3) Keep your calendar link defined as-is.
That should do it.
Good luck with ApEx and Happy Holidays to you as well!
John -
ERR-1002 Unable to find item ID for item "FLOW_SESSION"
Hi Guys,
I installed on the weekend HTMLDB on our new development server and installed version 1.5.1.0.12 (Oracle 10.1.0.3)
I imported our workspaces and applications.
However we are getting the err-1002 in the following scenario.
- logon to htmldb as a developer.
- run application
- Login page is show (as this is a secure application)
- Login with a test user account. We have setup our own aurhentication scheme, with our own user account table.
- Click login button and we get Error ERR-1002 Unable to find item ID for item "FLOW_SESSION" in application "113".
The only way to get around it is to setup a user account in our own user account table with the same name as your developer account or create a developer account in HTMLDB for the "test user account". I have set myself as a user in the "application account table".
But wait there is more. The "work a round" gets me in. Now I select the logout button and get the login page again.
I then try to login as the test user and get in ok.
Any idea what is happening here??Follow up debugger output
==========================
0.91: Processing point: AFTER_SUBMIT
0.91: ...PLSQL (AFTER_SUBMIT) begin owa_util.mime_header('text/html', FALSE); owa_cookie.send( name=>'LOGIN_USERNAME_COOKIE', value=>lower(:P101_USERNAME)); exception when others then null; end; Content-type: text/html; charset=WINDOWS-1252 Set-Cookie: LOGIN_USERNAME_COOKIE=dynamic;
0.91: ...PLSQL (AFTER_SUBMIT) wwv_flow_custom_auth_std.login( P_UNAME => :P101_USERNAME, P_PASSWORD => :P101_PASSWORD, P_SESSION_ID => :FLOW_SESSION, P_FLOW_PAGE => :APP_ID||':1' ); Content-type: text/html; charset=WINDOWS-1252 Set-Cookie: WWV_CUSTOM-F_100_113=64513E8344E8C3CE; path=/; Location: f?p=113:1:18133698647045384719
0.92: Show ERROR page...
0.92: Processing point: AFTER_ERROR_HEADER
Error ERR-1002 Unable to find item ID for item "FLOW_SESSION" in application "113".
OK
0.92: Processing point: BEFORE_ERROR_FOOTER
Unexpected error, unable to find item name at application or page level.
0.92: ...Determine if user RAY with SGID 100 can develop application 113 in workspace 100 -
ERR-1002 Unable to find item ID for item "F145_QUERY" in application "4000"
Hi all,
First I will give you an overview:
APEX version: 3.2.1.00.10
DB Version: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
Now the problem description:
I have a report region of type: Function body returning sql_query.
After the sql_query is written into a variable, I would like to fill an application_item or page_item. The problem is, it is returning the error:
ERR-1002 Unable to find item ID for item "F145_QUERY" in application "4000"
After that I tried to create a stored function (return varchar2, because a sql_query is generated) which has got the same structure. Also I am trying to fill the session state of the application item.
Then I am just having the following code in my report region:
declare
q varchar2(30000);
begin
q := function_name;
return q;
end;
Funciton example:
create function simple_example return varchar2 is
q varchar2(30000);
begin
q := 'select sysdate from dual';
apex_util.set_session_state('F145_QUERY', q);
return q;
end;
But even then I am getting the error.
Is it a bug? And how can I solve the problem?
Any help is highly appreciated. Thanks in advance,
DeniseHi Scott,
most of the time the obvious solution is the best, I agree.
But I have checked that one, before I posted the thread ;-)
And yes, the error message really says Application 4000. That is, why I am so confused, cause I know that that is the APEX itself.
The actual code is written within the report region. As I said, I tried 2 versions.
The second version is explained above and the first version was the code within the report region:
declare
q varchar2(30000);
begin
q := 'select sysdate from dual';
:F145_QUERY := q;
return q;
end;
The report region is a normal report with source_type = Function_returning_sql_query.
That is all I know, and now I hoping to find someone who has got an explanation or a even a solution for this. :-)
Thanks,
Best regards,
Denise -
Error: ERR-1002 Unable to find item ID for item "APP_SESSION"
Hello all,
I created an application for faculty in HTMLDB 1.6.
To get to the application faculty members log into a different website, and then follow a link to my application. The link re-directs them to a public page which pulls their unique ID from a cookie stored by the first website. After their ID is found they are automatically logged in, or if the ID is not present they are redirected to the main login page.
A few faculty members have tested the automatic login with success. One member, though, followed the same steps, but when he clicked on the link and was re-directed to the application he recieved an error "error: ERR-1002 Unable to find item ID for item 'APP_SESSION'."
As for the code, the code first retrieves the cookie and gets the ID from it. The variable term_id is then set to the correct term value. This term value depends on what term was selected from the previous application. The term value may or may not be null (they are not required to select a term prior to being re-directed). If it is null, the faculty member is brought to a term selection page. If it is not null, the faculty member skips this step and moves on to the next page. These steps are known to work properly.
This plsql code follows directly after, which should login the user and either redirect him/her to the term select page if the term value is null, or the main page if there is a term value present:
IF term_id IS NOT NULL THEN
wwv_flow_custom_auth_std.login(
P_UNAME => faculty_id,
P_PASSWORD => faculty_password,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':MAIN_PAGE:'||:APP_SESSION||'::::TERM_ID:'||term_id
ELSE
wwv_flow_custom_auth_std.login(
P_UNAME => faculty_id,
P_PASSWORD => faculty_password,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':TERM_SELECT_PAGE:'||:APP_SESSION
END IF;
owa_util.redirect_url('f?p=FACULTY_APP:LOGIN:&SESSION_ID.');
The last part redirects them to the login page if all else fails
Any idea why one faculty member would receive the message "error: ERR-1002 Unable to find item ID for item 'APP_SESSION'" while others would not?
*NOTE: All variable and alias names here are not the actual names within the application.Ah, i see. I thought you only had to use v('APP_SESSION') in the login function while assigned the value of P_SESSION_ID, but I was wrong.
Thanks a lot Scott! It works perfectly now.
Tim
Maybe you are looking for
-
ReportDocument.Export() raises "Missing Parameter Values" exception
Hi Recently I encountered a question about SAP Crystal Report that I have a rpt file with several sub reports and I am required to make the data source to be XML with http/https URLs. I created different .NET pages which returns XML stream as data so
-
Re: How to save/download the report in excel from Report painter.
Dear Sapmates, I have created Cost element and Cost centere reports using report painter. Both the reports consists of nine coloumns. I would like to have the report in the excel. I tried the folliwng options : 1. System -> List -> Save -> Local file
-
I am writing an applescript that will put a string into a field the script creates. I have no problem creating that simple case. If the user has the cursor inside an existing field (where show codes is true), I want to append the new string to the ex
-
Page Item with Date format DD-MON-RR - APEX 32
Hello, I am passing date parameter but somehow it is not formatting date properly on calendars. For e.g. Below is my calendar query select distinct count(*) knt, initcap(username) username, to_date(to_char(trunc(timestamp),'DD-MON-RR'),'DD-MON-RR') t
-
How can get my ipad to turn on when screen is black?
Screen is black on my ipad and it won't turn on.