Changing the value of a control in a subvi

I think the answer is out there somewhere but I've read through many threads found with searches similar to this topic so sorry to repost...
I would like to change the value of a top-level VI control from a sub-vi.  The data is being used as a parameter, I was thinking about using a local/global but I've seen this discouraged.  Is there a way I can do it with references, property, or invoke nodes (or some other suggested method) ?
I am guessing that if I am not using globals I will need to wire into the sub-vi?
Dave

I'd like to clarify what I am trying to do a bit more...
The sub-vi has a control of the same type as the top-level vi.  The inital control value is being passed into the sub-vi from the top-level vi.  The sub-vi uses the control value in several places through local variables (reading and writing to it)
I would like to modify the vi so the top-level vi control value changes whenever the sub-vi changes the control value that is passed to it.
My last attempt was to make a refnum control in the sub-vi (by dragging from top-level block diagram to sub front panel) and then creating a property node from that refnum control.  Using the property node "value" did not give me the value of the control from the top-level vi as I had hoped.  Wiring it to a terminal that was expecting the same type of control (a cluster of two numerics) caused a wiring conflict.
I noticed elsewhere in the code that the programmer used a text file to save options (unfortunately the control I am working on was not originially included in the options).  There is a vi that, when called, either reads or writes to the text file.  From a C/C++ programming perspective it seems quite odd to me not to just keep all this data in memory and pass it around.  Is using a file to store variables a typical practice in LV programming (even when they are retrieved multiple times during program execution) ?

Similar Messages

  • There was an attempt to change the value of a control that is not visible.

    I am getting the below error on submitting on a screen.
    "There was an attempt to change the value of a control that is not visible. The submitted value for this control has been discarded."
    I am setting the values of the controls in "OnGetScreenEventHandler, OnInvestigationEndedEventHandler" implementation. Is there any way to check if the control is visible?
    Thanks,
    Rajan

    Hi,
    How Do I Check for the control Visiblity in the above said event handler?
    Here is my code
    private void formattAllDate(SessionContext currentContext) {
         log.debug("R2_XSR: Formatting all date");      
    setGlobalInstanceValue(currentContext,"Date1",formatDate(getGlobalInstanceAttribValue(currentContext, "Date1")));
    setGlobalInstanceValue(currentContext,"Date2",formatDate(getGlobalInstanceAttribValue(currentContext, "Date2")));
    setGlobalInstanceValue(currentContext,"Date3",formatDate(getGlobalInstanceAttribValue(currentContext, "Date3")));
    setGlobalInstanceValue(currentContext,"Date4",formatDate(getGlobalInstanceAttribValue(currentContext, "Date4")));
    setGlobalInstanceValue(currentContext,"Date5",formatDate(getGlobalInstanceAttribValue(currentContext, "Date5")));
    setGlobalInstanceValue(currentContext,"Date6",formatDate(getGlobalInstanceAttribValue(currentContext, "Date6")));
    setGlobalInstanceValue(currentContext,"Date7",formatDate(getGlobalInstanceAttribValue(currentContext, "Date7")));
    private void setGlobalInstanceValue(SessionContext currentContext, String attribute,Boolean value){
         try{
              currentContext.getInterviewSession().getRuleSession().getGlobalEntityInstance().getEntity().getAttribute(attribute).setValue(currentContext.getInterviewSession().getRuleSession().getGlobalEntityInstance(), value);
         }catch(Exception e){
              e.printStackTrace();
    private String formatDate(String dt){
    String newdt[]=dt.split("/");
    if (newdt.length==3){
    return newdt[1]+"/"+newdt[0]+"/"+newdt[2];
    return "";
    }

  • Dynamically changing the value in table control

    Hello Every one,
    In MD61 transaction table control am trying to change value dynamicaly i.e am trying to change value in table control automaticaly tht value to be captured and i need to show in status bar...
    Ex table control field is number: am giving 10,20,30 tht should show in status bar by adding if u enter 10 at status bar it show 10 then when u enter 20 it should add with 10 and give 30 ..
    in this way when ever u enter value in filed it should add with the status bar value.

    Hi!
    For conversion you can use the function module
    data :   w_amt         TYPE cms_dte_original_amt,
                                                                                    " Amount
                w_conv_amt    TYPE cms_dte_conv_amt,
                                                                                    " Converted amount
                w_kmein       TYPE cms_dte_original_curr,
       CALL FUNCTION 'CMS_API_CURR_CONV'
            EXPORTING
              i_original_curr = w_kmein
              i_original_amt  = w_amt
              i_result_curr   = 'INR'
              i_rate_type     = 'M'
              i_conv_date     = sy-datum
            IMPORTING
              e_conv_amt      = w_conv_amt.
    now accordingly you can move the currency and amount that is changed....
    here as you were saying that on f4 after selecting you want the other field to get the value on that currency.....
    this work can be done as here....
    in this the next field gets populated as the first field gets the value......
    refer to it.....
    https://wiki.sdn.sap.com/wiki/display/ABAP/GettingainputfieldpopulatedonenteringthevalueinoneInputfield
    Regards.

  • How to change the value from one input control to another input control?

    Hi Experts,
    I want to change the value from  one input control to another input control. For Example if i change month in first tab. it should reflect in second tab also. How should we acheive through input control or some other option.
    Here I attached screen shot.Please help me for this

    Hi,
    It is not possible to have Input controll in all tabs that will be set from another .
    But There is one workaround .
    Follow the link below .
    http://davidlai101.com/blog/2013/08/13/web-intelligence-input-control-that-affects-all-tabs/

  • Change the value of a SharePoint List lookup control value using javascript

    hi,
    could you please help in changing the value of a SharePoint List lookup control value using javascript.
    Please note that i have to change the lookup value which is in the form of a drop down from the infopath form.
    Thanks

    https://stackoverflow.com/questions/5678210/select-dropdown-menu-option-with-javascript
    Does that help?

  • How to change the value of finished goods

    Hi
    Finished goods Material has been created with MB1C Mvt type 561. Valuation has taken from  Material master standard price. can we change the value of the same. Can any body help me.
    rgds
    Raghu shetty

    Hi,
    If the valuation is from standard price, then you must run a new product costing (tcode CK40N). Check in forums of controlling (CO) and production (PP). I think that you have PP, ie: BOM, routes, and so on.
    If the valuation is from variables prices (check it in table MBEW in field VPRSV) then run MR21 and set the new price (check it in MM forum)
    I hope this helps you
    Regards,
    Eduardo

  • Can you change the value of a variable that is reset by a parameter?

    Sorry if this is simple but I just crashed a package and can't do an autopsy. I suspect I sent it into an infinite loop. I know you can't change the value of any passed in parameters. What I tried to do was have the parameter set the value of a variable
    and then I tried to change the value of the variable. Is that even allowed?
    I was trying to do this:
    MyCheckVariable = MyParameter (which equals true)
    (some cool stuff happens)
    MyCheckVariable = False
    I hit F5 and my package turned into the Energizer Bunny. Is the way I try to reset the variable the culprit?

    This is a prototype so I just created a project parameter and set it to true. In the real world the parameter will be used to control an optional part of the process because on a re-run after error that part doesn't have to be ran again.
    So when I say MyCheckVariable = MyParameter (which equals true) in reality what I actually have is in the variables window I'm using an expression and it looks like this in the variables window
    name = runDownload
    Scope = Package
    Data Type = Boolean
    Value = True (but greyed out)
    Expression = @[$Project::param_runDownload]

  • How to change the value of project data in the BPM instance?

    Hi Everybody,
    I have a situation that after the bpm instance was created. We found that one of the project data/variable contains the incorrection information. Is it a way we can change the value of that project data/variable? I checked the BPM workspace, as administrator, there are not function for it and we can't stop/withdraw the instance. Can we change the MDS database for it? Please advise. It is so important for us that will stop us to move on of our project.
    Thanks

    As per my knowledge we can not change the value of BPM project variables from outside BPM. If you look at PAPI API also you will find methods to get values from BPM but not to set to BPM.
    If this is daily issue for your application then change your design to add a Edit Data Activity (Screen) and then use Grab functionality to get the control to this Edit Data Activity to change the required data.
    Else if it is an issue with the only one instance then it is better to Abort this instance and re-create the instance with correct data. Changing value in the MDS database is not encouraged.
    Hope this helps.

  • Is it possible to change the value of "maxdatafiles" after creating a db??

    Hi, all.
    Is it possible to change the value of the followings after creating a database??
    -maxdatafiles
    -maxinstances
    -maxlogfiles
    -maxlogmembers
    -maxloghistory
    Thanks and Regards.

    Hi Chris,
    Thanks for updating that but here's what in Oracle Doc:
    From Oracle Documentation (Oracle® Database New Features Guide 10g Release 2 (10.2))
    Eliminate Control File Re-Creation
    With the control file enhancements, there is no longer a requirement to re-create the control file when changes in the configuration parameters are made. These include the MAXLOGFILE, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES, and MAXINSTANCES parameters.
    This feature eliminates database downtime when a configuration parameter change is made in the control file
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14214/chapter1.htm#sthref12
    Regards

  • How to change the value of a color picker?

    Hi *,
    I am currently working on a small project and I would like to use the colorpicker. When I initialize the colorpicker the, the widget is updated and shows the correct color, but when I try to change the value at runtime, nothing happens. Did I miss something?
    Many thanks
    package javafx.tests.colorpicker;
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ColorPicker;
    import javafx.scene.layout.StackPane;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class ColorPickerChangeColor extends Application {
         public static void main(String[] args) {
              Application.launch(args);
         @Override
         public void start(Stage stage) throws Exception {
              VBox vbox = new VBox();
              vbox.setPadding(new Insets(10));
              vbox.setSpacing(10);
              Button button = new Button("Press me.");
              final ColorPicker colorpicker = new ColorPicker(Color.BLUE);
              button.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        colorpicker.setValue(Color.YELLOW);
                        System.out.println("Set color of the picker to yellow.");
              vbox.getChildren().add(colorpicker);
              vbox.getChildren().add(button);
              StackPane root = new StackPane();
              root.getChildren().add(vbox);
              stage.setTitle("ColorPicker");
              Scene scene = new Scene(root, 200, 200);
              stage.setScene(scene);
              stage.show();
    }Edited by: 963445 on Jan 3, 2013 12:23 PM

    Yeah, it's a known bug:
    http://javafx-jira.kenai.com/browse/RT-22538 "[ColorPicker] changing color using setValue() ... is not reflected by rectangle and text on control."
    In fact, there are 34 known ColorPicker bugs:
    http://javafx-jira.kenai.com/secure/IssueNavigator.jspa?reset=true&jqlQuery=%28summary+%7E+colorpicker+OR+description+%7E+colorpicker+OR+comment+%7E+colorpicker%29+AND+issuetype+%3D+Bug+AND+status+in+%28Open%2C+%22In+Progress%22%2C+New%29

  • How to create a Credit Memo Req by changing the value of the material price

    Hello,
    We have a requirement where we are want to change the value while creating a credit memo request wrt Billing doc.  Is there a way to change the price of the material rather then the qty on the credit memo request?  The system allows only Qty change and not the price change.
    Pelase help!
    Arpita Rani

    Update the price condition record first. Then in the credit memo - go to conditions and click on update button, select option - copy manula elements and redetermine others.
    ALso you can check the copy controls from your Invoice to CM Reqest (VTAF) @ item level - check price Type B. If the condition record is diferent from the one on billing, thenyou will get updated price in your cmr.
    Regards
    Sai

  • Exit to change the value of  eban-ekgrp and ekko-ekgrp

    Hi all,
    which user exit is the best to change the value of eban-ekgrp and ekko-ekgrp

    Hi Deva,
    My client wants to control the desired purchasing group matched with material group during creating/changing OA, PR & PO.
    So I created customised screen to map between purch group & mat. group .
    I have to find the appropriate exit/BADI to change the pruch. group  regarded the mat. group is found in the customised screen.
    For PR/PO, i have found the BADI, for OA , i still dont know which exit to use .. pls advise..
    thanks,
    Ester
    Message was edited by:
            ester johannes

  • I can't change the values in Property Palette

    I am working with Report Builder 3.0.5.17
    I generated a report layout with the wizard ;altough i set the width of the fields to certain dimensions (30 or 15),in the Property Palete it is diffrent(4000! or other and the most important thing : i can't change it! When i run the report, i get no data, it's empty! (i verified the interogation with Toad and everithing's fine)
    What could be the problem?
    Thanks!

    Hi,
    I'm quoting from Reports Builder Help:
    The Width property specifies the maximum number of characters that the values of the column can occupy. This Width refers to the width that Reports Builder uses internally for the column. It affects such things as the calculation of summaries and formulas. The size used to display the column's data, however, is determined by the size of the associated field in the Paper Layout view and its Vertical Elasticity and Horizontal Elasticity properties.
    If the Column Type is Database Scalar and the Datatype is Character, Date, Number, or Raw, Width is uneditable. However, this does not mean you cannot control the width of the column's values in the report output. You can change the width of the values in the output by modifying the field's width in the Paper Layout or the Field properties.
    About the report not containing any data, there could be several reasons:
    Make sure that the physical width of the columns is enough to display the values. Tyry changing the values for Horizontal / Vertical Elasticity in the property inspector.
    Also check the vertical / horizontal elasticity of the frame / repeating frame surrounding the field.
    Make sure that you are connecting to the DB with the correct username.
    Navneet.

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

  • I cannot change the value in about:newtab from "newtab" to "blank." The dialog is displayed but when I click Ok, the value is not changed.

    I cannot change the value in about:newtab from "newtab" to "blank." The dialog is displayed but when I click Ok, the value is not changed.
    ===Answer===
    Comment on usual method and solution, by a forum Moderator.
    As long as there are no confounding factors, such as certain extensions, or a user.jsfile the procedure is as follows
    # Open a new tab and type "about:config" in the address bar.
    # In the Search bar type: "newtab"
    # Locate and double click "browser.newtab.url"
    # In the "Enter String Value" box change "'''about:newtab'''" to "'''about:blank'''" and click OK.
    # Verify that the value has changed and now all new tabs will be blank.
    See post under by ''pirate048'' [/questions/976589?page=2#answer-509482] ~J99

    Have to say that I rather agree with Mark..all we want is a simple, unadorned clean page that doe not track and show usage!! WHY NOT!! Is it too simple for developers..we aren't all (nor do we want to be!) software experts! Come on Mozilla..tidy up and clean up..it might be a quicker programme too!!

Maybe you are looking for