Controlling position of thumbnails using variables

Hi the code is attached for reference.
This action script controls a photo gallery
I need to modify the dimensions of the movie clip. I was able
to change the position of where the main image clips and also where
the thumbnails appear at the starting point, however when the
scroll pane starts to move to left and right I cannot control it's
position any longer. I need to show the thumbnails about 500 from
the left of the flash and make sure it will stay this way. Right
now, when I mouse over the scroll pane the thumbnails start moving
to the left all the way to about 4 pixels from the left of the
movie.
Can someone help. I am providing links for the difference
between movie clips. Any help is super appreciated.
Before
changing movie dimensions
After
changing movie dimensions

cool thank u so much! I've tried to change the X and Y on the
code that is attached to the frame, but its still loading in in the
same place. Take it its here that you set the positions? whats the
100 value that is attached to the button?

Similar Messages

  • Controlling table column alignment using variable

    Hi I'm new to Javascript, having only used Applescript before.
    I'm using Indesign 5.5 on Mac and I'm learning Javascript by adapting old Applescripts that I have been using for years.
    So, with an existing table, one of the things I want to do is to set the alignments in the columns using a varible. Here's what I've tried so far:
    function setColumnWidthsAndAlignments()
        var myWidths=[29, 23, 13, 13, 13, 13];
        var myAlignments=["leftAlign","leftAlign","centerAlign","centerAlign","rightAlign","rightAlign"];
        var numberOfColumns=myTable.columns.count();
        for (c=0;c<numberOfColumns;c++)
            myTable.columns[c].width=myWidths[c];
            myTable.columns[c].cells.everyItem().texts.everyItem().justification=Justification.myAlignments[c];
    but I get an error
    -- Object does not support the property or method 'myAlignments' --
    If I discard the variable myAlignments and just put leftAlign for example, it works, so maybe I'm not declaring the variable properly?
    I know I could add a few extra paragraph styles and cell styles and style the table that way, but I though this would be a good learning exercise (besides which I want to limit the number of paragraph styles in the document - there are enough already!)
    If anybody is really interested, I'd like to place the whole script here and would really welcome any feedback on how the structure could be improved or optimised or just tell me if I'm heading in the right direction.
    Thanks and regards,
    Malcolm
    //Simple table script 1
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll; //make sure that user interactivity is switched on ????  why????
    if(checkForOpenDocs()) //checks to see if there are any open Indesign documents
            if(targetMyTable()) //checks to see if the selection is inside a table - if not, gives an error dialog - if it is, returns variable myTable which can be used to target different parts of the table
                   // selectLastRow();
                    //resetTable();
                    //applyTableTextParaStyle();
                    //removeRules();
                    //applyAlternatingFills();
                    setColumnWidthsAndAlignments();
                    //setRowHeightsAndInsets();
    function checkForOpenDocs()
        if (app.documents.length!=0)   //there is at least one document open
            myDocument = app.documents.item(0);    //get the id of the frontmost document - might be useful?
            return true;
        else
            alert("There are no documents open");
            return false;
    function targetMyTable() //no matter what is selected in the table, change selection to be whole table
        if(app.selection[0]==null) //if there is nothing selected
            alert("There is nothing selected.");
            return false
        var mySelection = app.selection[0];
        switch(mySelection.constructor.name)
                                            //When a row, a column, or a range of cells is
                                            //selected, the type returned is always "Cell"
            case "Cell":
            myTable=mySelection.parent;
            return true
            break;
            case "Table":
            myTable=mySelection;
            return true
            break;
            case "InsertionPoint":
            case "Character":
            case "Word":
            case "TextStyleRange":
            case "Line":
            case "Paragraph":
            case "TextColumn":
            case "Text":
            if(app.selection[0].parent.constructor.name == "Cell")
                myTable=mySelection.parent.parent;
                return true
            else
                alert("The selection is not inside a table.");
                return false
            break;
            case "Rectangle":
            case "Oval":
            case "Polygon":
            case "GraphicLine":
            case "TextFrame":
            if(app.selection[0].parent.parent.constructor.name == "Cell")
                myTable=mySelection.parent.parent.parent;
                return true
            else
                alert("The selection is not inside a table.");
                return false
            break;
            case "Image":
            case "PDF":
            case "EPS":
            if(app.selection[0].parent.parent.parent.constructor.name == "Cell")
                myTable=mySelection.parent.parent.parent.parent;
                return true
            else
                alert("The selection is not inside a table.");
                return false
            break;
            default:
            break;
    function resetTable()
        myTable.cells.everyItem().clearCellStyleOverrides (true);  
    function selectLastRow()
        //myTable.cells.itemByRange(0,-1).select();
        myTable.rows.itemByRange(-1,-1).select();
    function applyTableTextParaStyle()
        myParagraphStyle=myDocument.paragraphStyles.item("•table text");
        myTable.cells.everyItem().texts.everyItem().appliedParagraphStyle = myParagraphStyle;
    function removeRules()
        myTable.cells.everyItem().topEdgeStrokeWeight=0;
        myTable.cells.everyItem().bottomEdgeStrokeWeight=0;
        myTable.cells.everyItem().leftEdgeStrokeWeight=0;
        myTable.cells.everyItem().rightEdgeStrokeWeight=0;
    function applyAlternatingFills()
        myColor=myDocument.swatches.item("Black");
        myTable.alternatingFills=AlternatingFillsTypes.alternatingRows;
        myTable.startRowFillColor=myColor;
        myTable.startRowFillTint=20;
        myTable.endRowFillColor=myColor;
        myTable.endRowFillTint = 0;
    function setColumnWidthsAndAlignments()
        var myWidths=[29, 23, 13, 13, 13, 13];
        var myAlignments=["leftAlign","leftAlign","centerAlign","centerAlign","rightAlign","rightAlign"];
        var numberOfColumns=myTable.columns.count();
        for (c=0;c<numberOfColumns;c++)
            myTable.columns[c].width=myWidths[c];
            myTable.columns[c].cells.everyItem().texts.everyItem().justification=Justification.myAlignments[c];
    function setRowHeightsAndInsets()
        myTable.rows.everyItem().minimumHeight=1.058;
        myInset=0.5;
        myTable.rows.everyItem().topInset=myInset;
        myTable.rows.everyItem().bottomInset=myInset;

    You'd probably have more luck trying something like:
    var myAlignments = [Justification.LEFT_ALIGN, Justification.LEFT_ALIGN,
    Justification.CENTER_ALIGN etc.]
    and then in the other line: ...texts.everyItem().justification =
    myAlignments[c];
    Alternatively, you could try keeping it as you have it, but perhaps
    changing it to this:
    texts.everyItem().justification = eval("Justification."+myAlignments[c]);...
    which just creates a string and then runs it with eval.
    At any rate, the problem as I see it with what you have is that you
    myAlignments is an array of strings, and you cannot access a property of
    an object (in this case Justification) with a dot+string. When you put
    "Justification.leftAlign" and it works, I think that's because leftAlign
    isn't acting as a string -- it's simply a property of the Justification
    object.
    Ariel

  • Can I use variables in mxml tags?

    I want to control a lot of details in a layout.  I need to use variables to do this.  Of course I can use AS.  Is there a way to do it in the MXML tags?  See the code below.  I can do the "myLine.x = lineX" in AS.  But is there something like:  x="{lineX}" to use in a tag?  (This gives a warning, though it does work.)  It would make life faster if I could...   Is there a "right" way to do this?
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   initialize="init()" >
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                internal var lineX:Number = 25;
                private function init():void {
                    myLine.x = lineX + 50;       
            ]]>
        </fx:Script>
        <s:Line id="myLine" xFrom="0" xTo="0" yFrom="50" yTo="300" >
            <s:stroke>
                <s:SolidColorStroke color="0x0000ff" weight="2" />
            </s:stroke>
        </s:Line>
        <s:Line id="myOtherLine" x="{lineX}" xFrom="0" xTo="0" yFrom="50" yTo="300" >
            <s:stroke>
                <s:SolidColorStroke color="0xff0000" weight="2" />
            </s:stroke>
        </s:Line>
    </s:Application>

    Hmm, thanks, that's very useful to know.
    I guess that means I should use AS.  It's not something I need to update often.  Rather, I have a whole bunch of groups of components/graphics that I want to line up based on each other--and when I change my mind about the size or position of one thing (possibly inside a container a level or two), I'd like to be able to just change one variable name rather than have to change them all by hand.  But AS can do it just fine.

  • How to use variables in data slices?

    Hello,
    in BI-IP I have tried to use variables in a data slice.
    The user should fill these variables.
    How can one use and fill these variables?
    Thank you
    Daniel

    Hello Horst,
    data slice is a very strong system lock. It is normally not a good decission to allow users to control this part becuse it sould be in administration of a responsible person.
    If you allow users in the web to open or close data slices, this is like a "open period" funtion in financials: Think about what could happen, if anyone else than the responsible person could do that....
    This is my point of view.
    I would do it in anoter way: Create an User exit and fill a variable like desribed above. You read each line and make a decission whether the user might see this line or not (e. g. period open? yes or no?). The period and the status for the period could be maintained in a table or in a characteristic. table might be easier.
    regards
    Eckhard

  • How do i filter the records in analytic view by using variable/parameter for a time range

    i have a analytic view which has a output column as date type. i want the user who use this view have the control to decided the output records based on a time range (from x to y).
    i tried to create 2 variables, 1 for start_time, 1 for end_time. Ideally, i should have a expression for filtering data like this:
    $$start_time <= date_column <= $$end_time
    However, the variable windows doesn't seem to be feasible for the expression as above.
    Does anyone has the same problem and get it solved?
    Thanks!

    just figured out by my own. So the answer is using "variable" with "range" option.
    Making a variable, then set the "selection type" to "range".
    When preview the data, the variable input window pops up with operator on default "equal", use dropdown list to swtich it to "between", then you can enter the start_time and end_time as a range filter.

  • Using variable in Grand Total Label

    Hi All,
    I am using OBIEE 11.1.1.5 on Windows Vista.
    Can we use variable values in Grand Total label in pivot and table views?
    For eg. If user chose 2013 in dashboard prompt and we saved that in a presentation variable and want to use in the Grand Total label
    so that instead of text "Grand Total" we can show "Fiscal Year 2013 Total".
    Regards,
    Vikas
    Edited by: Vikas Barsaiyan on Feb 1, 2013 2:34 AM
    Edited by: Vikas Barsaiyan on Feb 1, 2013 2:34 AM

    I dont think but you may go for custom captions
    You can refere @ for 'Grand Total'
    In caption Year@ results YearGrand Total
    Other workaround : Use Narrative views to refer the variables, you might need to call variable in any of column expression and call it @n
    where n is for column position from left to right
    If helps mark
    Edited by: Srini VEERAVALLI on Jan 31, 2013 3:17 PM

  • JSlider or similar for controlling position in sound files help please.

    You know how winamp, wm player , etc, and JMStudio all have a "slider" bar to control position, along with a "numeric readout" of the current position.
    Fairly new to Java, but know this isn't a difficult thing to do, just haven't found out how to do it.
    Do not care if it is with JavaSound API or JMF, either is fine, just learning.
    Have read up on Sliders at:
    http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html#labels
    But do not understand how to implement it with Audio file usage.
    My goal as a new programmer is to create a simple audio playing Applet:
    For a GREAT idea on what it will basically do check out:
    JMStudio:
    http://java.sun.com/products/java-media/jmf/2.1.1/jmstudio/jmstudio.html
    My goals are to have:
    Applet
    GUI with: Pause/Play button and a SLIDER to control position, just like described.
    Have it load and play an audio file when a link is clicked on using the PARAM tag from html
    I know about the open source/commercial products,,,, but I'm trying to learn, and those are too in depth to try and learn from right now, trying to take baby steps, and having difficulty finding anything beyond play()
    loop() and stop()
    searched google, groups, yahoo with various phrases.
    Thank you!

    You have to use a JSlider and combine its events with the setMediaTime method of the player.

  • Problem in SELECT TAG using variables

    Hi all,
    I have a JSP page which updates the record for a user.Now there is a HTML select tag and when the user queries its data this SELECT tag will automaticaly select the user stored item in database automatically. It means the select tag will have a variable to select the options. Now how can i use variables in SELECT TAG. Please help needed.

    I'm not exactly sure what you are asking, but here goes.
    First, are you able to populate the select box with all the names... this is what it sounds like to me.
    Or are you not able to populate it nor select it.
    I use JSTL for all my jsps... so for me I would store a collection on the form and then iterate through it. (arrayList being my preference)
    look into using <c:forEach> or you could try <logic:iterate> which I've used before but it has been several years.
    here is an example block of code.
    Sorry this is going to be a bit convoluted because of what I'm doing with it..
    but I have an ArrayList that contains string arrays... position 0 being the value I want returned (like 1 through 10) and position 1 being the text representation..
    so it comes out like
    1 - Option 1
    2 - Option 2
    You will notice the if statement where I check to see if the localList[0] is equal to the view field. view would be your selected value.
    <SELECT name="view" size="7"
         multiple="multiple" class='OmniDlgLabel'>     
                   <c:if test="${sessionScope.PHI2Form.localList!=null}">
                        <c:forEach var="localList"
                             items="${sessionScope.PHI2Form.localList}" varStatus="status">
                             <OPTION value='<c:out value="${localList[0]}"/>'
                                       <c:if test="${sessionScope.PHI2Form.view==localList[0]}">SELECTED</c:if>>
                             <c:out value="${localList[0]}"/>-<c:out value="${localList[1]}" /></OPTION>
                        </c:forEach>
                   </c:if>          
    </SELECT></TD>There is an extra > that I cannot get rid of.. should be there after the
    <OPTION value='<c:out value="${localList[0]}"/>'

  • Using variables in shape's coordinates - urgent

    Hi,
    how can i draw using a variable to set the shapes coordinates ?
    i need to increment this variable to continue drawing in the panel
    at the last position.
    LIKE THIS:
    g.fillRect(490,210,300,100); ==> it works
    g.fillRect(x+100,y+100,150,150); ==> it doesn't
    x=x+100;
    y=y+100;
    when i scroll the panel and back to see the shape, it disappears.
    This happens because I am using variables in the coordinates of the shapes. Then, when the variable is incremented, the shapes lose its initial position.
    how can i do it ??? PLEASE HELP ME.
    THANKS.
    here is the code to execute. its very simple.
    import java.awt.*;
    import java.awt.event.*;
    public class SamS extends Frame
    public SamS()
    addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent ev)
    dispose();
    System.exit(0);
    ScrollPane sp = new ScrollPane();
    Board pan = new Board();
    sp.add(pan);
    add(sp);
    setSize(700,500);
    setVisible(true);
    public class Board extends Panel
    int x=20;
    int y=20;
    public Board()
    super();
    setLayout(null);
    setSize(2400,2400);
    setBackground(Color.white);
    public void paint(Graphics g)
    g.setColor(Color.black);
    g.fillRect(10,10,100,100);
    g.setColor(Color.red);
    g.fillRect(410,410,100,200);
    g.setColor(Color.orange);
    g.fillRect(490,210,300,100);
    g.setColor(Color.blue);
    g.fillRect(x+100,y+100,150,150);
    x=x+100;
    y=y+100;
    public void update(Graphics g)
    paint(g);
    public static void main(String args[])
    new SamS();

    Your incremented values (x and y) are out of the visible area as the repaint method will be called many times while scrolling. Increment your x and y to lesser value (say 1 or 2).

  • BPS ERROR I CREATE A NEW Manual Planning when a use variable in lead column

    Dear
    when a create a new manual planning have a message.
    Frist
    I create two variable one is Controlling Area other is Cost Element
    in planning area.
    next
    I a create a manual planning to make a report form.i create a
    manual planning layout category is key Figures and make Controlling
    Area and Cost Element as lead column in next continue setup lead
    columns tab.i set key figure and set Controlling Area and Cost Element
    to use variable above.and finish other tab.
    next
    i double click manual planning system give me a message
    The environment has changed; the layout can no longer be executed
    notes: i can insure Controlling Area and Cost Element is a single value
    and make sure both can mapping in cube
    by the way when i use fixed value this form will be run.
    Edited by: frank ju on Aug 6, 2009 11:13 AM

    Hi Everybody:
    I summarize the last post: In RoboHelp 7 for Word, the problem is that when I try to create a winhelp2000 project importing from a .hlp file of origin created previuosly, the import process makes error because it want to extract images that not exist on the .hlp file of origin. Thanks in advance for all the help that you can give me.
    Ismael.

  • Query runs slower when using variables & faster when using hard coded value

    Hi,
    My query runs slower when i use variables but it runs faster when i use hard coded values. Why it is behaving like this ?
    My query is in cursor definition in a procedure. Procedure runs faster when using hard coded valus and slower when using variables.
    Can anybody help me out there?
    Thanks in advance.

    Hi,
    Thanks for ur reply.
    here is my code with Variables:
    Procedure populateCountryTrafficDetails(pWeekStartDate IN Date , pCountry IN d_geography.country_code%TYPE) is
    startdate date;
    AR_OrgId number(10);
    Cursor cTraffic is
    Select
              l.actual_date, nvl(o.city||o.zipcode,'Undefined') Site,
              g.country_code,d.customer_name, d.customer_number,t.contrno bcn,
              nvl(r.dest_level3,'Undefined'),
              Decode(p.Product_code,'820','821','821','821','801') Product_Code ,
              Decode(p.Product_code,'820','Colt Voice Connect','821','Colt Voice Connect','Colt Voice Line') DProduct,
              sum(f.duration),
              sum(f.debamount_eur)
              from d_calendar_date l,
              d_geography g,
              d_customer d, d_contract t, d_subscriber s,
              d_retail_dest r, d_product p,
              CPS_ORDER_DETAILS o,
              f_retail_revenue f
              where
              l.date_key = f.call_date_key and
              g.geography_key = f.geography_key and
              r.dest_key = f.dest_key and
              p.product_key = f.product_key and
              --c.customer_key = f.customer_key and
              d.customer_key = f.customer_key and
              t.contract_key = f.contract_key and
              s.SUBSCRIBER_KEY = f.SUBSCRIBER_KEY and
              o.org_id(+) = AR_OrgId and
              g.country_code = pCountry and
              l.actual_date >= startdate and
              l.actual_date <= (startdate + 90) and
              o.cli(+) = s.area_subno and
              p.product_code in ('800','801','802','804','820','821')
              group by
              l.actual_date,
              o.city||o.zipcode, g.country_code,d.customer_name, d.customer_number,t.contrno,r.dest_level3, p.product_code;
    Type CountryTabType is Table of country_traffic_details.Country%Type index by BINARY_INTEGER;
    Type CallDateTabType is Table of country_traffic_details.CALL_DATE%Type index by BINARY_INTEGER;
    Type CustomerNameTabType is Table of Country_traffic_details.Customer_name%Type index by BINARY_INTEGER;
    Type CustomerNumberTabType is Table of Country_traffic_details.Customer_number%Type index by BINARY_INTEGER;
    Type BcnTabType is Table of Country_traffic_details.Bcn%Type index by BINARY_INTEGER;
    Type DestinationTypeTabType is Table of Country_traffic_details.DESTINATION_TYPE%Type index by BINARY_INTEGER;
    Type ProductCodeTabType is Table of Country_traffic_details.Product_Code%Type index by BINARY_INTEGER;
    Type ProductTabType is Table of Country_traffic_details.Product%Type index by BINARY_INTEGER;
    Type DurationTabType is Table of Country_traffic_details.Duration%Type index by BINARY_INTEGER;
    Type DebamounteurTabType is Table of Country_traffic_details.DEBAMOUNTEUR%Type index by BINARY_INTEGER;
    Type SiteTabType is Table of Country_traffic_details.Site%Type index by BINARY_INTEGER;
    CountryArr CountryTabType;
    CallDateArr CallDateTabType;
    Customer_NameArr CustomerNameTabType;
    CustomerNumberArr CustomerNumberTabType;
    BCNArr BCNTabType;
    DESTINATION_TYPEArr DESTINATIONTYPETabType;
    PRODUCT_CODEArr PRODUCTCODETabType;
    PRODUCTArr PRODUCTTabType;
    DurationArr DurationTabType;
    DebamounteurArr DebamounteurTabType;
    SiteArr SiteTabType;
    Begin
         startdate := (trunc(pWeekStartDate) + 6) - 90;
         Exe_Pos := 1;
         Execute Immediate 'Truncate table country_traffic_details';
         dropIndexes('country_traffic_details');
         Exe_Pos := 2;
         /* Set org ID's as per AR */
         case (pCountry)
         when 'FR' then AR_OrgId := 81;
         when 'AT' then AR_OrgId := 125;
         when 'CH' then AR_OrgId := 126;
         when 'DE' then AR_OrgId := 127;
         when 'ES' then AR_OrgId := 123;
         when 'IT' then AR_OrgId := 122;
         when 'PT' then AR_OrgId := 124;
         when 'BE' then AR_OrgId := 132;
         when 'IE' then AR_OrgId := 128;
         when 'DK' then AR_OrgId := 133;
         when 'NL' then AR_OrgId := 129;
         when 'SE' then AR_OrgId := 130;
         when 'UK' then AR_OrgId := 131;
         else raise_application_error (-20003, 'No such Country Code Exists.');
         end case;
         Exe_Pos := 3;
    dbms_output.put_line('3: '||to_char(sysdate, 'HH24:MI:SS'));
         populateOrderDetails(AR_OrgId);
    dbms_output.put_line('4: '||to_char(sysdate, 'HH24:MI:SS'));
         Exe_Pos := 4;
         Open cTraffic;
         Loop
         Exe_Pos := 5;
         CallDateArr.delete;
    FETCH cTraffic BULK COLLECT
              INTO CallDateArr, SiteArr, CountryArr, Customer_NameArr,CustomerNumberArr,
              BCNArr,DESTINATION_TYPEArr,PRODUCT_CODEArr, PRODUCTArr, DurationArr, DebamounteurArr LIMIT arraySize;
              EXIT WHEN CallDateArr.first IS NULL;
                   Exe_pos := 6;
                        FORALL i IN 1..callDateArr.last
                        insert into country_traffic_details
                        values(CallDateArr(i), CountryArr(i), Customer_NameArr(i),CustomerNumberArr(i),
                        BCNArr(i),DESTINATION_TYPEArr(i),PRODUCT_CODEArr(i), PRODUCTArr(i), DurationArr(i),
                        DebamounteurArr(i), SiteArr(i));
                        Exe_pos := 7;
    dbms_output.put_line('7: '||to_char(sysdate, 'HH24:MI:SS'));
         EXIT WHEN ctraffic%NOTFOUND;
    END LOOP;
         commit;
    Exe_Pos := 8;
              commit;
    dbms_output.put_line('8: '||to_char(sysdate, 'HH24:MI:SS'));
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_CUSTNO ON country_traffic_details (CUSTOMER_NUMBER)';
              execDDl(lSql);
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_BCN ON country_traffic_details (BCN)';
              execDDl(lSql);
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_PRODCD ON country_traffic_details (PRODUCT_CODE)';
              execDDl(lSql);
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_SITE ON country_traffic_details (SITE)';
              execDDl(lSql);
              lSql := 'CREATE INDEX COUNTRY_TRAFFIC_DETAILS_DESTYP ON country_traffic_details (DESTINATION_TYPE)';
              execDDl(lSql);
              Exe_Pos:= 9;
    dbms_output.put_line('9: '||to_char(sysdate, 'HH24:MI:SS'));
    Exception
         When Others then
         raise_application_error(-20003, 'Error in populateCountryTrafficDetails at Position: '||Exe_Pos||' The Error is '||SQLERRM);
    End populateCountryTrafficDetails;
    In the above procedure if i substitute the values with hard coded values i.e. AR_orgid = 123 & pcountry = 'Austria' then it runs faster.
    Please let me know why it is so ?
    Thanks in advance.

  • Move used variables/strings

    Dear all,
    I try to use Dasylab to control and collect data from several equipments at lab (thermostat, stirrer, syringe pump, manostat, thermometer...). Now I have prepared several worksheets (each for single equipment) and it +- works (it is necessary to complete with some functionality but for collecting current lab data it is sufficient). The worksheets works, but only for single equipment, but I need to work with all of them. So I rebuild the worksheets that the each equipment is packed at black boxes (each worksheet one black box ant it works). Then I save all of black boxes and put them to one worksheet. Unfortunately, the worksheet prepared this way doesn’t work because there are problems with global string and variables. When I save the black box, I don't save the string/variables definitions. For instance the expression of one string in original worksheet is calculated automatically this way: "R" + SubStr( "000",1, 3-(${VAR_51}>=1000)-(${VAR_51}>=100)-(${VAR_51}>10)) + StrFmt(${VAR_51},8,0)+${STR_52} to prepare output string "R0120\r". I am able to export and import global string and variables but only as whole package of 999 variables. I don’t know how to move only used ones (I am able to move them at TXT format, but I am not able to read them to Dasilab as variables).
    I have two questions:
    1 - Is there any possibility to set "calculate expression automatically" for string/variable during running of program (using some action module or something like that)?
    2 - Is there any possibility to save only used strings/variables and collected several packages of variables to one (for instance VAR_1-VAR_50 for thermostat and VAR_100-VAR_150 for thermometer)?

    I found that if I used the Define Global Variable dialog, and clicked the Save button, it gave me a choice of saving defined variables (those whose settings are not the default) or variable with descriptions.
    I saved the file. It gave me a file that included all of the information.
    I tried to use the Global Variables and Strings Import dialog, but the file was not ordered correctly.
    I opened it in Excel and changed the columns around to match the Help (see picture). Then, I saved it as a TXT file again.
    It imported with some errors - notably the additional settings, such as read at start, do not import. The one formula that I created imported correctly.
    I think that you can save the used variables from your various worksheets, combine them into one file, change the order of the columns. Since it's a text file, you can change the variable numbers if you need to... 
    Unfortunately, you cannot import strings this way, as the Help says "DASYLab can only read in strings from VAR formats."  Personally, I agree that this is a major limitation!
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • Error-Receiver File Adapter using Variable substitution when file is empty

    XI Experts,
    We are on PI 7.0, SP14.
    We are using variable subtitution to get the filename from source message. This works fine as long as we have data in the payload for filename element. But we have a scenario where we don't have to create file when certain condition does not exists in source message so in the message payload filename element will not exists in such condition and file will be empty and we should not create file.
    Parameter in the communication channel for Handling empty message is "Ignore".
    Does anyone knows how to handle this scneario. We don't want to default any file name in the message mapping if source file name element does not exists.
    We are following getting error in the Adapter engine.
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: file
    Thanks
    MP

    You can implement this by writing the module to throw an exception or whatever method you want to execute.
    If you don't want to receive an error message then module is suitable for you.
    Gaurav Jain

  • Using variables to insert data in the table

    I want to insert datas in the table. I use constants,
    all the constants are stored properly in the table. But,
    when I use variables I get the error message
    "Too few parameters. expected 6".
    (I declared all the fields of the table as text only.)
    My program is "newt.jsp"
    <%@ page language="java" import="java.sql.*" %>
    <html>
    <head>
    <title>storing customer information in the database</title>
    </head>
    <body>
    <%
    String cno1 = request.getParameter("cno");
    String n1 = request.getParameter("n");
    String add11 = request.getParameter("add1");
    String add21 = request.getParameter("add2");
    String phone1 = request.getParameter("phone");
    String email1 = request.getParameter("email");
    Connection con = null;
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:customer"," "," ");
    Statement statement1 = con.createStatement();
    Statement statement2 = con.createStatement();
    statement2.executeUpdate("create table cust1 (cno varchar(20),n varchar(20),add1 varchar(20),add2 varchar(20),phone varchar(20),email varchar(20))");
    statement1.executeUpdate("insert into cust1 (cno,n,add1,add2,phone,email) values(cno1,n1,add11,add21,phone1,email1)");
    catch(SQLException sqle) {
    System.err.println(sqle.getMessage());
    catch(ClassNotFoundException cnfe) {
    System.err.println(cnfe.getMessage());
    catch(Exception e) {
    System.err.println(e.getMessage());
    finally {
         try {
         if(con!=null) {
              con.close();
    catch(SQLException sqle) {
    System.err.println(sqle.getMessage());
    %>
    <br><br>
    Mr./Ms. <%=n1 %> <br>
    Your datas have been stored.<br>
    </body>
    </html>
    Those who know answer please reply.
    My thanks in advance.

    I would expect your insert statement to be this:
    statement1.executeUpdate("insert into cust1 (cno,n,add1,add2,phone,email) values('"+cno1+"','"+n1+"','"+add11+"','"+add21+"','"+phone1+"','"+email1+"')");
    If you just create a string, it's not going to fill in variables into the string by magic.

  • Using variable with the same name as field name?

    I have a complex proc where I have variables with the same name as field name used on a query. something like this:
    SELECT a.id_table WHERE a.id_table = id_table
    where the last id_table is a parameter sent to the proc:
    declare procedure myproc(id_table int)
    Is there any way or notation to declare the variable inside the query as a variable or I have to use a different name?

    Well, variables are not the only thing you have to change if you want to switch to Oracle.
    Although I don't think it is good practice (to use variable name same as column name), here is one example how you can achieve it using EXECUTE IMMEDIATE and bind variable
    SQL> select deptno, count(1)
      2  from scott.emp
      3  group by deptno;
        DEPTNO   COUNT(1)
            30          6
            20          5
    10 3
    SQL> set serveroutput on
    SQL> declare
      2  deptno varchar2(10);
      3  i number;
      4  begin
      5  deptno:=10;
      6  execute immediate
      7  'select count(1) from scott.emp where deptno=:deptno' into i using deptno;
      8  dbms_output.put_line('OUT ---> '||i);
      9  end;
    10  /
    OUT ---> 3
    PL/SQL procedure successfully completed.
    SQL> Message was edited by:
    tekicora
    Message was edited by:
    tekicora

Maybe you are looking for