Using System variable built-ins

Please suggest built-in to use in when-button-pressed trigger to navigate to block items
depending on which block the form is in. I used :system.cursor_block but nothing happens
when I click on button with it.
For button with when-button-pressed trigger I have
Declare
curblk varchar2(30);
Begin
curblk : = :system.cursor_block;
if curblk = 'block A'
then go_item('blockA.itemA');
show_view('blockA_canvas');
elsif curblk = 'blockB'
then go_item('blockB.itemB');
show_view('blockB_canvas');
elsif curblk = 'block C'
then go_item('blockC.itemC');
show_view('blockC_canvas');
end if;
End;

What are you trying to achieve? Based on your code example, it looks like you want to navigate to a specific item (say the first navigable item) in block if the user clicks on a button.
As to why your code doesn't work, I'm going to guess the reason nothing is happening is because you have the "Mouse Navigate" and "Keyboard Navigate" properties of your button set to YES. If this is the case, when you click on the button forms actually navigates to the button. This happens before the trigger behind the button is executed. Therefore, the cursor is always on in the block where the button is defined. If you want the button to evaluate the block/item of current item, set these properties to NO.
Aweiden is right, SYSTEM variables are stored in Upper Case and spaces are not allowed.
Hope this helps,
Craig...

Similar Messages

  • Error in using System Variable

    Dear all,
             I want to use System Variable 225 ( VAT percent (per VAT code) ) which is used in one of document i.e. "VAT Only Invoice".
    When I used it in my Invoice document the following error occurs:
    Printing Error : Invalid Variable number (RPT -6300)(Field:F_XXX) Variable 'XXX'
    Please help me to use this System Variable in my Invoice.
    Note: I have already read "How To Use the PLD Variables File in Release 2007 A" .pdf file.
    can any one tell the meaning of folowing which is in the sheet "vars utilisation" of PLD_Vars_march2007 xls file
    " it means that this variable can be used only under certain repetitive area exclusive numbers (109, 126, 132, 135, 139, 148, 149, 309, 316, 427, 502, 509, 686)
    Regards,
    Ghazanfar
    Edited by: Ghazanfar Ahmed on Jun 18, 2009 12:16 PM

    Hi,
    It is a special variable available for the VAT summary part, not to be used in the rows but in a separate repetitive area.
    To display the respective VAT rates in each row, create a database field instead: Tax Definition - Rate%. It will populate the VAT percentage for you.
    Regards,
    Nat

  • Using System Variables in a SQL Query

    Hi!
    I´m new to Oracle and SQL so i don´t know very much about it.
    There is miy Problem:
    Is there a way to Use the System Variable %USERNAME% in an SQL Query?
    I tried .... where table.shorttag = '%USERNAME%' ;
    but this doesnt work.
    Is Oracle able to handle Systemvariables? Or is there another way to use the current Windows User in an SQL Query.
    It is very Important to use the current Windows user and not the Oracle user.
    Thank you,
    Mfg

    Are you looking for something like this ?
    SQL> SELECT sys_context('USERENV', 'OS_USER') FROM dual;
    SYS_CONTEXT('USERENV','OS_USER
    SAUBBANE\IBM
    SQL> SELECT sys_context('USERENV', 'TERMINAL') FROM dual;
    SYS_CONTEXT('USERENV','TERMINA
    SAUBBANEAlso you can look at the dbms_application_info package.

  • Using :system. variables in a PLL

    Dear members,
    It seems that the use of system variables is not allowed in PLLs.
    Since PLLs have to be compiled before use, you can't either have a call to a procedure stored in the .FRM on which the PLL is attached.
    Do I have to attach a special library to my PLL so it can find the system variables ?
    Can I use something else than PLLs to store my procedures out of my .FRM ? Something that would not have to be compiled separately, but would be part of the .FRM compilation ?
    Any clue ?
    Thanks for your help.

    Sorry, I saw it after posting my message, and after posting a new thread, as Monojeet suggested !
    That's a good idea, but I will have to create a trigger for each procedure I call (I can't send the name of the procedure to a trigger that would execute the associated procedure). I'll see if it can be a problem for us.
    Thanks a lot anyway.

  • How to use System Variable SY_ROW in the Process Instruction Category

    Hi ,
    I want to assign a value of System variable SY_ROW to a Normal Variable in the Process Instruction Category and use it in the formula. Please help me with the Syntax in the Process Instruction Category to get the System Variable: SY_ROW value into a Variable.
    Thanks,
    SV

    Hello,
    You can use these variables in formulas or, for example, to pass on certain pieces of information to a function module. How the function called by the function module behaves depends on the type of information passed on.
    SY_ROW is used to view the current Table line.
    Please look into the below link for more details on syntax :
    http://help.sap.com/saphelp_46c/helpdata/en/1a/514e38493e4774e10000009b38f889/frameset.htm
    http://help.sap.com/saphelp_470/helpdata/en/1a/514e38493e4774e10000009b38f889/frameset.htm
    Hope the information is helpful
    Regards

  • Using system variables to open new SCO and then return to same slide in previous SCO

    Hi,
    I am working on a eLearning project which will have about 30-40 individual lessons (SCOs), with a common Glossary of terms used in the lessons.  The user needs to be able to click on the Glossary button in any lesson, go to the Glossary and then ideally return to the same slide in the SCO where they clicked on the Glossary button.
    I am still learning Advanced Actions but I have seen variables such as curentScene, and currentFrame.  Could these variables be used to create an Advanced Action which would take the user back to the same slide or is there a system variable which could be used to peform this function?
    Really need help on this one.  If what I am trying to do is not possible then knowing that would be very useful too as I will not spend anymore time trying to find a solution but will look at other alternatives.
    Thanks,
    Richard

    When you reopen a file, all variables are reset... so with Advanced actions this will not be possible AFAIK. Michael Lund, cpguru, has a Save and Load Data widget that allows to pass values of variables between files. Maybe JavaScript could help as well?
    I do not know the system variable you are pointing to. There is cpInfoCurrentSlide and cpInfoCurrentFrame but scenes? Perhaps you are using StoryLine and confusing the terminology. In this blog post you can find a link to the complete list with available system variables in Captivate 6:
    http://lilybiri.posterous.com/system-variables-in-captivate-6
    Lilybiri

  • Classpath in - system variable or user variable?

    Where should the classpath be specified? I am using the same machine so is it better to use system variables for specifying classpath in control panel or should I use user variable?

    User once you know what you're up to.
    System will cause you no end of grief if you work on more than one project at a time.
    Your choice, though, as it'll depend on your circumstances.

  • System Variable No. for AP Invoice Document Date

    Hi,
    I have an Outgoing Payment PLD. 2 fields was empty after the upgrade from 2007A to 8.8.
    AP Invoice's Document Date and Customer/Vendor Reference No.
    For AP Invoice's Document Date, I have tried the database field (Table: A/P Invoice, Column: Document Date) but it didn't work. Came out empty.
    Initially, the database field for Customer/Vendor Reference No. came out empty as well but i used system variable 201 which worked.
    I was just wondering if there is a system variable for AP Invoice Document Date as well? Or is there another way so that I can show the AP Invoice Document Date in the Outgoing Payment PLD?

    I sort of solved this problem myself.
    Apparently, OPCH table (AP Invoice) was not available in the drop-down menu.
    So, I selected the closest I can get: OJDT table (Journal Entry) and selected TaxDate - Document Date.
    It works now.

  • Error when using the variable System::ErrorDescription

    HI All,
    When I try to use the variable System::ErrorDescription I get the following error:
    The element cannot be found in a collection. This error happens when you try to retrieve an element from a collection on a container during execution of the package and the element is not there.
    Do I need to declare it or it's a variable that always is available to get exceptions from the execution states?

    if this is in a Script Task then:
    - add the variable in the Script task property ReadOnlyVariables list
    - in the Script Code refer to it as
    string ErrorDesc = (string) Dts.Variables["System::ErrorDescription"].Value;
    Jan D'Hondt - SQL server BI development

  • Using System::StartTime in variable for external file name comes out incorrect sometimes

    Hi All,
    I have an interesting dilemma.  I'm using SQL Server 2005 with Visual Studios 2005 (9.00.4035.00).
    I'm writing records from my database table out to an external flat file, nothing fancy other than in the naming of the file being dynamic and using system time.  So I have a couple of variables set:
    CR_Dir = \\host\directory\
    CR_Outfile = "AP_" +  (DT_WSTR, 4)  YEAR( @[System::StartTime] ) + RIGHT("0" + (DT_WSTR, 2) MONTH(@[System::StartTime] ),2) + RIGHT("0" + (DT_WSTR,2) DAY( @[System::StartTime] ),2) + RIGHT("0"
    + (DT_WSTR,2) DATEPART("Hh", @[System::StartTime] ), 2) + RIGHT("0" + (DT_WSTR,2) DATEPART("mi", @[System::StartTime] ),2) + RIGHT("0" + (DT_WSTR,2) DATEPART("ss", @[System::StartTime] ),2)
    + "_chref"
    And then in my Connection Manager properties I have an expression that brings them all together with a file extension:
    @[User::CR_Dir] +  @[User::CR_Outfile] + ".ctl"
    So what I should get for example is something like AP_20140309214502_chref.ctl  (if the job was run on 03/09/2014 @ 9:45pm) When executed properly.  I do this for two flat files one with an extension of .txt and the other with .ctl. 
    These steps are working fine the majority of the time.
    However, my problem is that occasionally, the portion of the filename that contains the datetime stamp is completely incorrect for one of the two files that are created during the same time frame.  And I'm not talking about a few seconds or even a minute
    or two, the date is off by weeks.  Here's an example:
    AP_20140309214502_chref.txt
    AP_20140213152253_chref.ctl
    This has happened twice since starting to run this job over the past four months, once on 12/15/2013 and again 03/09/2014.  This job is run every night at 9:45pm, and all the other days that this job runs the two filenames come out perfectly. 
    So I'm leaning towards something in the system that may be corrupting my variable every once in a while?  But because it happens intermittently how can I verify this?  Or is there a better way to perform what I'm trying to do that would be more accurate
    and consistent?
    Any help would be appreciated.
    Thanks
    Sawyer

    Hi All,
    I haven't found a solution to this issue.  I'm not actually able to reproduce it at will, so it's hard to troubleshoot.  What I've decided to do is rewrite my variable expression and make one system call for date and time and place it into
    a variable and then use the variable to build the file name.  Also I changed from using the System::Startime to using the GFETDATE() function (Don't know if this helps but it was easier to use in my substring when I parsed out the different time elements:
    v_DATETIME   STRING   SUBSTRING((DT_STR,30, 1252)GETDATE(), 1, 19)
    CR_Outfile      STRING   "AP_" + SUBSTRING(@[User::v_DateTime],1 ,4 ) + SUBSTRING(@[User::v_DateTime],6 ,2) + SUBSTRING(@[User::v_DateTime],9 ,2) + SUBSTRING(@[User::v_DateTime],12, 2) + (@[User::v_DateTime],15 ,2) + SUBSTRING(@[User::v_DateTime],18,2)
    + "_chref"
    I don't want to leave this thread as unanswered for too long so I'll give it another day or two and then close it.  I'll report back in a few months to let you all know if this problem has reoccurred or not.
    Thanks for the assistance.
    Sawyer

  • Using the system variable cpInfoQuizAttempts

    My content is run through an LMS. I am trying to used advanced code using the system variable cpInfoQuizAttempts so that a caption appears when the variable value = 3. Apparently, I can't utilize the value of this variable; in fact, I can't even display it's value in a caption. I am trying to create advanced code on a course page that displays a caption like "You canot take this quiz again because you have already taken it the maximum number of time possible." once someone has taken the course the maximum number of times.  I assume this is the variable Captivate is using to show # attempts on the results page. I tried this with just a user variable but the value of the user variable is not stored or saved on the LMS. Therefore, if you have a maximum number of 3 attempts and someone takes the quiz twice, if he logs off and logs back on, the previous value (2) is not saved and the value reverts to the default (0).
    Any ideas how this could be done?
    KO

    I'm pretty sure that all user defined variables are saved in suspend_data in the LMS. Therefore your user defined variable should be there, but I don't see any way how Captivate would be able to retrieve it again out of the box.
    I think that the cpInfoQuizAttempts variable refers to attempts done in the same "session". So if fail the test and then retry and fail it would have a count of 2. However, once the user exists the course the variable is no longer available to Captivate.
    As Rick said most LMS' have a function to define max / min attempts of a quiz. However, this most likely requires that you publish the quiz as an independant SCO since the "lockout" would apply for that SCO. Basically if you only have one SCO then your users wouldn't be able to access the content or the quiz if they exceded the max attempts. Your content should therefore be one (or more) SCO(s) and your quiz one separate SCO.
    If I'm not mistaken it's also possible to define the max / min attempts in the SCORM manifest, but this is very geeky.
    If you own and can use Flash you could solve your problem two ways:
    1. Create a Flash file that retrieves the user defined variable from the LMS suspend_data and then sends that back into Captivate. Import the Flash file into your Captivate project.
    2. Create a Flash file that stores and retrieves the attempts in a Shared Object on the users PC and then brings the stored value back into Captivate. Import the Flash file into your Captivate project.
    /Michael
    Visit my Captivate blog with tips & tricks, tutorials and Widgets.

  • BW 2.0B, info package selection, cant use two system variable for 0CALMONTH

    Hi Experts,
    I am working on BW 2.0B in APO system. There is an info package for which I want to supply two selection value for 0CALMONTH as equal to current month and last month. System variables 0CMONTH (for current month) and 0CMLMON (for last month) are available but I am not able to use them both.
    If I change the variable in one selection, it automatically changes the other one too, making both the selection as same variable.
    Can you suggest any solution/idea?
    Regards,
    Purvang

    any ideas to achieve this?

  • I want to use system and job variables to make the information dynamic in the Email Subject Line

    Someone could mention the subject line character limitation needs to be expanded. 50 chars is not much to work with! 
    Is it possible to make SUBJECT Line to make , use system and job variables to make the information dynamic , Right now there is a limit for Characters in the Subject line ... is it possible to expand ???  

    I've encountered the same issue and worked around it by using generic variables that would always be the same for a certain email alert. eg =  "System XYZ -source file delay for :"
    So a sample subject would then be: 
    Where ENV = DEV/UAT etc.
    This functionality allows you to use generic alert templates for all filewait jobs, and just filling in the variables.
    A slight problem is that although this works very well, the use of group variables in email / alert actions is (/ wasn't) officially supported by Cisco when I last ran it past then. Cisco, any update in this?

  • How to manipulate Windows System Variables using Java

    Hi There,
    I want to manipulate Windows System variables (e.g. PATH, CLASSPATH) using Java program. Could anyone please let me know how it can be done in Java.
    Regards,
    Rakesh Nagar

    This is not just a Java question. It has never been possible in any Windows program to permanently change the value of an environment variable. You can only change it temporarily, and when the process that changed it ends, so does the change to the environment variable. This has been true since environment variables were added to DOS in about 1983.

  • How can i get system variable using java

    Hi,
    I just want to know how can i get system variables using java code.
    for example i want to get the the date for today or i want to get the number of processes that's running.
    Thanks alot

    Hi,
    I just want to know how can i get system variables
    using java code.
    for example i want to get the the date for today or i
    want to get the number of processes that's running.
    Thanks alotSome generic "system variables" are available though Java, usually through the System class.
    Date today = new Date();
    is instantiated with the current date and time.
    Other system values, like environment values, should be passed to java through the command line (-D option) by setting system properties.
    Finally, platform specific values like the number of processes running will have to be written in platform specific code and executed by JNI (java native interface).
    Java is platform or system agnostic. Common system values, like time, are implemented. Hopefully you won't need platform specific values.

Maybe you are looking for