Icon name as Global variable

Hi,
In my forms i can set a single static icon name for a button. Is it possible to give the icon name as global variable name to change the icon of the button dynamically by changin the value of the global variable.
Using set_item_property i can change. But it seems tough to implement in my forms.
Please Help!
Balaji.M

What's the problem with set_item_property??
You can use the global variables to store the name of icon file to associate with the button.
But, ultimately you'll have to use the set_item_property to reflect the changes dynamically.
set_item_property(<block.item name>,ICON_NAME,:global.<icon file name>);
I don't think, by just setting global variables you can get your requirement to work.
You'll have to use set_item_property, if you want to change the icon file name dynamically.
Please mark answer as helpful / correct, if it helps you
Navnit

Similar Messages

  • How can i notice the name of global variable ?

    When the customizing.fmx calls the standard.fmx, I came accross an error "FRM-41067 Can not find menu Item".
    customizing.fmx --> call --> standard.fmx
    So, I want to assign a global variable to standard.fmx in the customizing.fmx.
    How can i find out the name of global variable ???
    Can I catch the name of global variable??
    For expamle..
    :global.menu_id was not the answer.
    :global.mn_id was not the answer.
    :global.mnid was not the answer.
    HOW!!!!!!!!!!!!!!!!!!!!
    Please HELP ME!!!

    Hi
    Can I catch the name of global variable?? yes u can , if u use a message after each type like...
    :global.menu_id
    MESSAGE (' global.menu_id = ' || global.menu_id );
    SYNCHRONIZE; Hope this helps...
    Regards,
    Abdetu...

  • Get names of global variables from report (like Tab "Globals" in debugger)

    Hello,
    is it possible to get a list from all available variables in a report at runtime like the tab "Globals" in the new debugger?
    The problem is that i don't know the names of the variables. So i could not do a dirty assign with field-symbols.
    best regards
    Marcel Gäbe

    Try RS_PROGRAM_INDEX
    table compo returns. filter with type = D
    Will you please check GET_GLOBAL_SYMBOLS & RS_PROGRAM_INDEX _SOURCE

  • Set file name by global variable

    Hi,
    I am trying to load data from excel file. I have created batch job with global variable $GV_FileName. When I set a global variable value in a script inside Workflow the data load successfully. When I set a global variable value as a job property I receive the error: "The variable <$GV_FileName> of the is empty. Please initialize the variable to a valid value." But in  debug mode I see that the variable is not empty.
    Thanks in advance.
    Lyudmila

    In the job -> properties -> Global Variables tab you set the default value. The actual value used is set when executing the job. Could it be that?

  • Find and replace global variables

    Hi there,
    I've ran into a mess with my global variables. While I was trying to rename one of the globals, all instances in hundreds of subvis turned corrupt. The icon of the global variable turned black and the wires starting at the variable became broken. The amazing thing is that the black icons seem still to be linked to the correct global variable. If I leave the mouse cursor on the icon, the correct file path appears in the context help window. If I double click on the corrupt icon, the correct vi is opened. I tried "Save as" and "Rename" with various options. LabVIEW seems to browse through all affected vis but the icons remain broken. My last hope was to run the "Find and replace" tool (Ctrl + F), but it doesn't work for global variables for some unknown reason, unfortunately. Compare
    http://forums.ni.com/ni/board/message?board.id=170&message.id=438450&query.id=2151294
    Is anybody out there who has a useful hint?
    Peter

    stoeckel wrote:
    Hi there,
    thank you all for your contributions. We were able to solve the problem in the meanwhile. Why did nobody point us to the fact that the icons of global variables turn black if the name of the control on the panel of the variable does not match the selected name inside the icon?
    The LabVIEW compiler would have told you that right away. If you click the broken run arrow on the situation you will get the message:
    An item with the specified name could not be found. Select a different item from the list.
    Seems pretty straightforward to me. But then, perhaps it's because I've been using LabVIEW for some time.
    If somebody just quietly mentions the existence of "global variables" he or she will usually be soused with flout and bashed by the proven active veterans. But why's that? Global variables can provide an easy way to communicate a "stop" information throughout all running vis. As long as there is just one writer and many readers, there is no danger that it comes to "race conditions".  
    If global variables are really so nasty as is often said, why does National Instruments still provide them within LabVIEW??
    I don't want to get into yet another global variable debate here. The only comment regarding global variables made in this thread was a tongue-in-cheek comment I made. I was not dissing global variable. In fact, I use them quite often. Global variables, like every other programming construct ever invented have their use. The main reason you will see the so called "proven active veterans" go crazy over global variables is that they constantly see them being abused, causing race conditions, and then have to listen to newbies complain that their program doesn't work and LabVIEW sucks, when it's really their programming skills that's the real problem. But that's just my opinion.

  • What are the best practices to use GLOBAL Variables

    Hi,
    Please guide how Global Variables can be declared and how they can be initialized.
    Further please guide what are the impacts of Global Variables(if any) on the memory of CLIENT or SERVER, if they are not initialized or freed up after usage.
    Thanks.
    Regards.

    spilgrim wrote:
    My preference is not to use them and to use parameters or package variables. There is not real control on globals so you can end up with an applicatios that has lots of them that are only used once but persist for the user session.I second that. I don't know how often I searched for bugs caused by typos in the names of global variables. Plus the fact that they are only of datatype VARCHAR2. If you are using share_library_data you could also use Package globals in a forms library to share data between called and calling forms. Or you could use a database package...
    cheers

  • How can i find all global variable and parameters in a form?

    I don't know name of global variables and parameters,but i want get their name and value .
    how can i do? who can help me?
    Thank you.
    Daniel Liang
    2007.1.19

    no problem. As Francois said you can't do it programmatic in runtime.
    But when you use the debug-mode you can see each global with name and value.
    By the way: It's not good to not know all the globals in your application. This is one of the most important things you have to write down for your app. Create a wiki for such informations, so that all developer can share their information.

  • SAP BODS XI 3.2 - batch job, global variable, name includes apostrophe - why failing?

    Global Variable in batch job used to define user access (add/update/remove) - how do we handle the inclusion of an apostrophe in a name?
    Tested with wildcard prior to apostrophe, still failing.
    Any clues, please?
    Thank you.

    I believe you can not use any special characters in global variables name.

  • How to auto create a global variable with specific variable name in a global vi ?

    how to auto create a global variable with specific variable name in a global vi using lv ? Because i need to add a lot of global variable in this global vi. But you know, if  i manually add them , it will be a much time-costing work. So i want to use someway to auto generate ? Can i ?? Thanks a lot !

    Hi
    what aartjan is saying is the way for you. but you can develop an utility which will actually help you create global variables. To get the details on this just have a look at VI Scripting section on LAVA forum.
    But i would like you to suggest few things
    1. If your programs have so many global variables (Thats why u want utility) then you should take out some time to read about LabVIEW design patterns. I think if programmer follows these practicess he dont need a single global variable.
    2. Their are some other ways to achieve similar functionality as of global variables (Uninitialized Shift Registers, Single Element Qs and so on) but they are much faster than global variables.
    I am Attaching Whatever Resources i am having I will also attach the template of the design pattern i generaly use in short duration
    Message Edited by Tushar Jambhekar on 10-06-2005 07:33 PM
    Message Edited by Tushar Jambhekar on 10-06-2005 07:36 PM
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog
    Attachments:
    LabVIEWDesignPatterns.zip ‏1505 KB
    Large_Code_Implementation.zip ‏522 KB
    Database Tests.zip ‏868 KB

  • Dynamic CSV file name in target (Multiple workflow calling same dataflow with new global variable value)

    Hi their,
    I have multiple data flows doing 90% of the process same. The difference is in source query where clause and target flat file.
    I used the global variables to dynamically change the query where clause easily, but I need help in dynamically changing the target flat file (CSV file).
    What I want to do is have multiple workflows, which will first set the global variable to new value in the script box and then call the same data flow.
    Please let me know if you have any solution or any idea which might put me in the direction to my quest for solution.
    thank you,

    Hi Raj - in your content conversion for lineitem .. read the additional attribute as well.
    Change your source strcture and additional field company_code
    As you are already sending the filename for each line item using the UDF.. it's just you need to modify your UDF to take another input i.e. Company Code.
    or
    If your PI version is > 7.1 use the graphical variable to hold the filename..
    and while sending the company code information for every item just use the concat function to append filename & company code..
    http://scn.sap.com/people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-graphical-variable

  • Loading a text file into a global variable issue - really a global var?

    From all the documentation and examples I can find, it appears that it would be
    correct to create a global array variable [outside of any functions] to load image names into,
    then use these images for a slideshow. I want to make the app dynamic, in that changing the text file gives a new set of images.
    The global variable goes null [no values] after the load event listener. Why is that?
    Isn't global, well global, and alive for the duration of the SWF?
    PARAMS.TXT:
    monthNames=January,February,March,April,May,June,July,August,September,October,November,De cember&dayNames=Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
    CODE:
    var dNames:Array = new Array();
    var mNames:Array = new Array();
    var request:URLRequest = new URLRequest("images/params.txt");
    var variables:URLLoader = new URLLoader();
    variables.dataFormat = URLLoaderDataFormat.VARIABLES;
    variables.addEventListener(Event.COMPLETE, completeHandler);
    try
    variables.load(request);
    catch (error:Error)
    trace("Unable to load URL: " + error);
    trace("2 mNames 2: " + mNames[2]);
    trace("2 dNames 3: " + dNames[3]);
    stop();
    function completeHandler(event:Event):void
    var loader:URLLoader = URLLoader(event.target);
    dNames = loader.data.dayNames.split(",");
    mNames = loader.data.monthNames.split(",");
    trace(loader.data.dayNames);
    trace("1 mNames 2: " + mNames[2]);
    trace("1 dNames 3: " + dNames[3]);
    OUTPUT:
    2 mNames 2: undefined
    2 dNames 3: undefined
    Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
    1 mNames 2: March
    1 dNames 3: Wednesday
    How do I access these values after loading from the external file, after the load?
    Thanks in advance.

    The statement you quoted from whatever Adobe documentation is correct.
    If you want to load the data into the arrays before anything else happens, then have anything else that happens execute via the completeHandler function... after the data is loaded and processed into the arrays.
    the command: loadFile() executes before the trace("2:" +images[4]); command.  The loadFile function is processed and the loading process BEGINS... but starting the loading does not delay the main processing from continuing down the line--the loading itself becomes a secondary/background task.  The command was to execute the loadFile function and the processing of that function was completed.  If you don't believe so, then add a trace...
    function loadFile():void
         vars.dataFormat = URLLoaderDataFormat.VARIABLES;
         vars.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
         vars.load(new URLRequest("images/fnames.txt"));
         trace("started loading");
    If you add that trace, you should see that the loadFile function execution is completed and the next line in your code is then processed... trace(2....)
    The addEventlistener does not stop anything.  The addEventListener code is assigning a monitor, not a traffic controller... it is telling the monitor to indicate when the data has finished loading.  It is not telling anything to stop program execution.
    So if you want to wait until the data is loaded before you do anything else... it goes....
    function onComplete(evt:Event):void
         var urlVars:URLVariables = evt.target.data;
         images = vars.data.images.split(",");
         tnails = vars.data.thumbnails.split(",");
         ................HERE.................

  • How do i create and pass a global variable from one vi to several sub-vi's?

    Hi Guys,
    I am trying to create a program that opens several front panels (sub-VI's) in sequence. in each front panel, the user would open a file that the name is obtained from the previous sub-VI. I would like to know how i could pass the filename and refnum of the file thorough from one sub-vi to another. A global variable would do it in VB, but how do we do global vars in LABWIEW. thanks
    Papish

    I put together a sample VI and Sub VI that illustrates how to pass a Refnum and access a data file while in a Sub VI.
    For multiple VIs just repeat the sub VI process.
    You probably don't wanna use a Global Variable if not needed (can add to the mess down the road haha).
    Let me know if it helps you out! Or if I can clarify anything else!
    Chances are if you have seen VI in the forest it hasn't fallen.
    Attachments:
    Passing Refnum.zip ‏21 KB

  • How do you override global variable values when calling oraxsl or xsl.exe?

    I am a newbie to oracle xslt.
    I have down loaded the latest version of xdk (10.1.0.2...). (Jan 2, 2009).
    In the past I haveI used micorsoft's "msxsl.exe" to perform my transformations.
    I am looking for a more up-to-date transformation tool.
    I found Oracle's version, and thought I would try it out.
    I have run the "bin/xsl.exe -hh" command.
    I read its help data. It states that variables are
    passed by coding a pramater "-V <var> <value>".
    I have also examined the oraxls.bat file.
    I found the documentation on "oracle.xml.parser.v2.oraxsl" class.
    It states that parameters are passed after the "-p" switch.
    It says the value of the -p parameter is "a list of paramemters".
    I don't find this sufficient information to be useful.
    I can spend days guessing, and I might get lucky.
    I thought it my be better to ask for help.
    I need to pass in (override) values for 3 global variables.
    I saw the method
    "setParam(namespace, variable, value)",
    near the documentation for the "oraxsl" class.
    How do you format the options string to communicate more than one param statement?
    (in either xsl.exe and/or oraxsl class).
    Suppose I have an xslt stylesheet as follows:
    ==================================================
    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.1" xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
    <xsl:param name='a' select='"default_a"' />
    <xsl:param name='b' select='"default_b"' />
    <xsl:param name='c' select="'default_c"' />
    <xsl:template match='/'>
    this is value for a: <xsl:value-of select='$a' />
    this is value for b: <xsl:value-of select='$b' />
    this is value for c: <xsl:value-of select=$c' />
    <xsl:apply-templates />
    </xsl:template>
    </xsl:stylesheet>
    ========================================================
    Now as part of the calling of the XSL processor I want to change the value of these
    three global parameters.
    I want:
    a="current_a",
    b="current_b",
    and c="current_c"
    How do I express this using xsl.exe and its paramter string (-V ????).
    and/or how do I express it to the oraxsl class ( -p (xsl, a,"current_a"), (....) )???
    The syntax for specifying this information is not very clear in either situation.
    Of course I am making the "assumption" that by "param" they are
    refering to "global parameters" (as in my stylesheet), rather than some other global parameters of XLST.
    As an aside inquiry:
    I had hopped that the Oracle's xsl Verion 2 routine could handle xslt 2.0 commands
    such as "xsl:for-each-group", since it handled multiple xsl:outputs.
    From reading some of the documentation it seems it only handles xslt 1.0 syntax/commands.
    Is this true? (or is the documentation not up-to-date?).
    Any help on passing param values to xsl.exe and/or "oraxsl" class is appreciated.
    Thanks.

    Here is the line from one of my testing .bat files that passed in one parameter. I can't recall if I've passed in two, but this will give you a starting point for passing in multiple
    java -cp %CPath% oracle.xml.parser.v2.oraxsl -p show_image='yes' %ValXML% %ValXSLT% As for XSLT 2.0 support, it appears it does per {thread:id=503445}

  • How do I add a global variable to my app?

    Hi all,
    I am building a flex app which displays data in different tabs from a mysql database and I wan't to add a sign in process to make sure only registered users of the mysql db can see the data.
    To achieve this I built a sign in component which accepts a username, password and the name of the database to connect to. My flex app then uses a php script to verify that the user can connect to the database using the details entered. If not, the sign in component displays an error message, but if sign in details are verified then the user can see the data from the database.
    How can I store the details in the flex app for that users session so that when the user queries the db for data, flex uses the details entered during the sign in process to connect to the mysql db and submit the query?
    I thought about storing the details as an array in a global variable and then accessing that global variable from anywhere in my app but I don't know if that is the correct/secure way to do what I want, nor do I know how to do it. Any help would be much appreciated.
    Thanks in advance,
    xander

    quick, dirty example, could be improved on but it'll get you rolling;
    After user login has succeeded, send off another HTTP service eg;
    ========
    <mx:Script>
             <![CDATA[
                public var whateverUserNameWasEntered:String;
                 public var whateverUserPasswordEntered:String;
         public function onLoginSuccess():void
              whateverUserNameWasEntered:String = loginbox.text;
              whateverUserPasswordEntered:String = passwordbox.text;
              storeSessionStuff.send();
         ]]>
        </mx:Script>
    <mx:HTTPService id="storeSessionStuff" showBusyCursor="true" method="POST"  url="http://localhost/store.php" useProxy="false">
            <mx:request xmlns="">   
              <username>
                   {whateverUserNameWasEntered}
              </username>
              <password>
                   {whateverUserPasswordEntered}
              </password>       
            </mx:request>
        </mx:HTTPService>          
    ========
    direct it to the php file.....
    <?php
    session_start();
    $_SESSION['username'] = $_POST['username'];
    $_SESSION['password']   = $_POST['password'];
    ?>
    Then, whenever you want to get the information out of the Session, send off another HTTP Service...;
    <mx:HTTPService id="getSessionStuff" result="storeData(event)" showBusyCursor="true" method="POST"  url="http://localhost/get.php" useProxy="false"/>
    to the php file....
    <?php
    session_start();
    print "<details><username>".$_SESSION['username']."</username><password>".$_SESSION['password'] ."</password></details>";
    ?>
    which, you need a result function for:
    <mx:Script>
             <![CDATA[
              private function storeData(evt:ResultEvent):void
                    var username:String;
                    var password: String;
                   username = evt.result.details.username;    
                   password = evt.result.details.password;         
          ]]>
    </mx:Script>
    ta daa
    (if thats what you meant)

  • How to print global variable in smart form table cell

    hi,
    i have smartform and i insert table in it, i also have set global variable, i want to show variable in table cell.
    regards
    shahid rais

    Hi Shahid Rais 
    You can use this global variable that has been declared in anywhere as you like.
    For displaying global variable in table lines, You can first set the column and row of the table by using the table tab in table node . Then, u can decide either the variable u want to used will be placed on header, main, or footer. After that, right click on one of the table part, and choose create table line. After choosing the correct line type as already been declared in the table painter, just simply right click on the table cell, and then create text node.
    You can now enter your variable by using "insert field".
    And don't forget the & & signs before and after your variable name.
    Regards,
    William Prawira

Maybe you are looking for

  • Using Scheduling in OWB 10.2.0.1 (Paris)

    Dear all after some clarification on the use of scheduling in OWB 10G R2. We have just installed this version but i have a couple of questions surrounding the scheduling, may i point out that i have no knowledge of schedling in OWB so am relying on t

  • Cant get video from iPad to come up on Apple TV... Can hear audio

    No video comes up when I hit airplay icon on my iPad (3rd Gen) to my Apple TV (2ndgen).  I can hear the audio.  I can see video on my iPad.  I was trying to view from HBOGo.  Didn't work trying to view YouTube either.  It worked fine a month ago .  O

  • Compiler fails to compile the file for iOS

    I have been on porting a flash project on the iOS platform. At first I was able to convert small files to iOS without any error. But when i started compile a big file (fla of around 5-6 MB and 100-120 .as files) for the same it gave me an error. Erro

  • I have ipod touch 1st gen and its on but frozen

    I have a ipod touch 1st gen and its powered on but is frozen any help?

  • TOMCAT CAN�T FIND BEAN CLASSE

    Hello, i am from Argentina. i need URGENT help with tomcat, because i am developing my final thesis. I have all my sources in C:\jakarta-tomcat-5.0.16\webapps\tesis C:\jakarta-tomcat-5.0.16\webapps\tesis\ (archivos jsp) C:\jakarta-tomcat-5.0.16\webap