Need help with custom calculation Script

Hey everybody.  I'm using Acrobat X Pro and stumbling a bit on the syntax of the following equation.  I need to add the value of "Cell1" & "Cell2" then add the value of "Cell3.  However, the value of "Cell3" is entered by the user and specifies a percentage of the sum of "Cell1 &"Cell2".  For example: If the user enters "3" in "Cell3" I need the value returned at 3% of the sum of "Cell1" + "Cell2".  If the user enters "9" in "Cell3" I need the value returned for "Cell3" 9% of the sum of "Cell1 and Cell2" and the end result should be the sum of "Cell1 Cell2 + Cell3.  In more detail:

If "Cell1" = "Cell2" $ 500 = $500 and "Cell3" = '3' then I need the returned value to be $1030,00.

I hope this makes sense. Here's what I have so far, but alas, it does not work.  Any help would be GREATLY appreciated.

Get the first value in the field, as a number

var v1 = + getField("Cell1").value;

Get the second field value, as a number

var v2 = + getField("Cell2").value;

Get the value of a field, a number transformation

var v3 = + getField("Cell3"/100).value;

Calculate and set the value of this field for the result

Event.Value = v3 + (v1 + v2);

Thank you

Solan

I have posted a reply, but realized that it wasn't what you wanted. There is some confusion about what you want for Cell3. A hand, you say that the user enter a vaule in the area, but them you say you want its calculated value based on what the user has entered and two other field values. It seems to me Cell3 should be the domain that the user enters the percentage, and the calculated field (Cell4) script could be:

Get the first value in the field, as a number

var v1 = + getField("Cell1").value;

Get the second field value, as a number

var v2 = + getField("Cell2").value;// get treatment field value, as a number

Get the percentage

var v3 = + getField("Cell3").value;

Calculate and set the value of this field for the result

Event.Value = (1 + v3 / 100) * (v1 + v2);

Tags: Acrobat

Similar Questions

  • Need help with custom script to rename the layers

    Hello world.

    I need help to write a custom script (because I suck at it) that will allow me to go through all the layers and sous-calques for a specific name ('X') and give it a new specific name ('Y').

    I have had success using the script below, but it does not work on any text layers names where the text layer was previously particularly well-known in 'X' and now changed needs.

    Any help is greatly appreciated.

    * Note: this script was originally used to find any layer with 'Copy' in its name and remove with anything after (to correct the problem of duplication of layers by adding this text).

    This is why the function is named removeCopy. It works for renaming layers also - just not a layer of text unfortunately.

    #target illustrator

    function removeCopy() {}
    If (app.documents.length == 0) return;
    var app.activeDocument = docRef;
    recurseLayers (docRef.layers);
    }
    removeCopy();
    function recurseLayers (objArray) {}
    for (var i = 0; i < objArray.length; i ++) {}
    ObjArr [i] .name = ObjArr [i].name.replace (/ \s*current name\s*\d*/, 'new name');
    If (objArray [i] .layers) recurseLayers (. layers.length > 0 ObjArr [i]);
    }
    }

    I finally found something after searching forums for a week. My confusion was related to the way Illustrator treats real layers against text/path/object "layers." Instead of layers, I had to use the pageItems in the script. The code below works. Thanks to Gustavo for his answer in another thread and Carlos I thank you for this looking too good! You're great to be ready to help models do more advanced things with Illustrator.

    var doc = app.activeDocument;
    var items = doc.pageItems;
    for (var g = 0; g)
        elements [g] .name = elements [g].name.replace ('Century Schoolbook text line', ' MonogramText: Century Schoolbook ");
    };
    App.Redraw ();
  • Need help with understanding PowerCli scripting by LucD

    Hello

    I'll give you the standard statement that I am a noob powercli and don't really know what I'm doing here.  Here's a script that works because it runs without error and gives a report but I need help to understand this under his weight.

    Connect-VIServer '< our vcenter >' - user < user > admin-password < admin-user-pwd >

    $allvms = @)

    $vms = get - Vm | where {$_.} PowerState - eq "Receptor"}

    $start = (get-Date). AddDays(-1)

    $metrics = "mem.usage.average".

    $stats = get-Stat-entity $vms - start $start - Stat $metrics

    $stats | Group-object - property {$_.} Timestamp.Day}, {$_.} @entity.name} | %{

    $vmstat = "" | Select the day, MemAlloc, MemMin, MemMax, MemAvg, VmName

    $vmstat. VmName = $_. Values [1]

    $vmstat. Day = $_. Group [0]. Timestamp.Date

    $mem = $_. Group | where {$_.} MetricId - eq "mem.usage.average"} | Measure-object-property value - average - Maximum - Minimum

    $vmstat. MemMax = [int] $mem. Maximum ##dfsdf

    $vmstat. MemAvg = [int] $mem. Average

    $vmstat. MemMin = [int] $mem. Minimum

    $vmstat. MemAlloc = $_. Group [0]. Entity.MemoryMB

    $allvms += $vmstat

    }

    $allvms |

    Export-Csv "c:\ < folder > \ <>.csv file Destination"-noTypeInformation

    It connects to our server vcenter server and offers two days of data.  Today and yesterday, all with a timestamp of 0:00.  See below for an example of a virtual machine.

    VmNameDayMemAllocMemMaxMemAvgMemMin
    < name VM1 >07/05/2016 0:004096181818
    < name VM1 >06/05/2016 0:0040963612

    8

    The MemMax, the MemAvg and the MemMin are for this day?  Just the max of this period of sampling time 0:00?

    What I'm looking for, it is to find that the use of the maximum memory of virtual machines are for the whole day.  So I hope that I can remove memory of VMs that do not use it.  I was listed on the change $start = (Get-Date). The value of AddDays(-1) to $start = (Get-Date). AddDays(-30) and see what things alike.  I want to be sure however that the value for MemMax is the highest value for a period of 24 hours.  That is to say for the 07/05/2016 the given virtual machine never used a maximum of 18% of his memory attributed the 06/05/2016 the maximum amount of memory used was 36%, and so on that I extend on the date range.

    Kind regards

    Michael

    It then becomes a rather simple Get-Stat script.

    $vms = get - Vm | where {$_.} PowerState - eq "Receptor"}

    $start = (get-Date). AddDays(-1)

    $metrics = "mem.usage.average".

    Get-Stat - entity $vms - start $start - Stat $metrics |

    Select Timestamp,@{N='VM'; E={$_. @entity.name}}, Value |

    Tri-objet-VM property |

    Export-Csv "c:\------.csv '-noTypeInformation

  • Need help with custom dialog box

    I created a custom help dialog box. The problem is that 5 buttons do not properly fit in my manager of horizontal field on some blackberry devices. How can I make own? I tried to use my own custom buttons that allow me to specify their width and height, but I'm unable to get the width of the dialog box, so I can't determine how wide should be buttons.

    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    
    public class HelpDialog extends Dialog
    {
        static int ButtonPressed;
        HorizontalFieldManager hfmChoices = new HorizontalFieldManager();
        ButtonField cmdFirst = new ButtonField("|<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 0;
                close();
                return true;
            }
        };
        ButtonField cmdPrev = new ButtonField("<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 1;
                close();
                return true;
            }
        };
        ButtonField cmdNext = new ButtonField(">")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 2;
                close();
                return true;
            }
        };
        ButtonField cmdLast = new ButtonField(">|")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 3;
                close();
                return true;
            }
        };
        ButtonField cmdClose = new ButtonField("Close")
        {
            protected boolean navigationClick(int status, int time)
            {
                close();
                return true;
            }
        };
    
        public HelpDialog(String message, int page, int maxPages)
        {
            super("Help (Page: " + page + " of " + maxPages + ")\n\n" + message + "\n", null, null, -1, null, 0);
            ButtonPressed = -1;
            if (page <= 1)
            {
                cmdFirst.setEnabled(false);
                cmdPrev.setEnabled(false);
            }
            if (page >= maxPages)
            {
                cmdNext.setEnabled(false);
                cmdLast.setEnabled(false);
            }
            hfmChoices.add(cmdFirst);
            hfmChoices.add(cmdPrev);
            hfmChoices.add(cmdNext);
            hfmChoices.add(cmdLast);
            hfmChoices.add(cmdClose);
            add(hfmChoices);
        }
    }
    

    Thank you

    Most people have no need a close button, they expect the ESC to do it for them.

    That said, I disagree with this statement:

    "I think that the only good way to use managers other than the AbsoluteFieldManager, is to use them at all."

    Designing a user experience that works well on multiple devices is difficult, and I don't think that has a size fits all approach work.  In addition, I don't have the time to create formats for specific screens for each device type, and although this will not happen now, I didn't have to rework screen designs every time that a new device came out.  I think that it is possible to create a common user interface experience given the size of the screen, and whether it is touch.  If you want to read my thoughts on this, have a look at the tutorial of the user interface you will find here:

    http://supportforums.BlackBerry.com/T5/Java-development/tutorials-for-new-developers-part-1/m-p/1621...

  • Need help with the calculation on the invoice form

    I've never used Adobe Acrobat and know nothing about JavaScript.  I am creating a form of invoice.  I have it almost complete but can't do 2 things resolved.

    1. If a line on the invoice is not used, I need the amount column empty, not 0.00.

    2. I need to add 2 totals (parts and labor) and calculate the sales tax on the total of these 2 items.

    Everything I read is way over my head. I'm an accountant, not a programmer!

    Thank you

    # 1, you can configure a custom JavaScript validate it is simply:

    // Custom Validate JavaScript
    if (+event.value === 0) event.value = "";
    

    # 2, use the simplified notation next to the calculation field:

    Parts * work * 0.085

    Replace 0.085 with tax rate that you use

  • Need help with files combining script

    Hey guys, I'm a graphic designer who is really hoping most commonly the code can someone help! I have several hundred images that need to be combined. A client gave me a folder of images and their alpha cards as separate files. I need combine each image and alpha map and export the new image format PNG 24 with transparency. Doing so by hand will take forever, do this with a script is going to be awesome. The script must:

    -Open Filename.png

    -Create a duplicate of the background layer (as background layers may not have masks it seems)

    -Remove the background layer

    -Add a layer mask to the new double layer

    -Open filenamea.png (the alpha cards follow convention assignment of names + a .png file name)

    -Copy filenamea.png into the layer mask to filename.png

    -Save the filename.png for Web and devices such as a PNG 24 with transparency in a folder called converted (to avoid overwriting the old image)

    I'm sure it's more complicated, it seems, but is - someone up to help a poor, illiterate code GD?

    Here's a JavaScript solution only, for the curious. Save it as MergeAlpha.jsx and run it from Photoshop.

    X

    function cTID(s) { return app.charIDToTypeID(s); };
    function sTID(s) { return app.stringIDToTypeID(s); };
    
    function main() {
    
      var folder = Folder.selectDialog();
      if (!folder) {
        return;
      }
    
      var ofolder = new Folder(folder + "/Converted");
      ofolder.create();
    
      var saveOpts = new ExportOptionsSaveForWeb();
      saveOpts.format = SaveDocumentType.PNG;
      saveOpts.PNG8 = false;
      saveOpts.transparency = true;
    
      var pngs = folder.getFiles('*.png');
    
      for (var i = 0; i < pngs.length; i++) {
        var file = pngs[i];
        var afile = new File(folder + '/' + file.name.replace('.png', 'a.png'));
        if (!afile.exists) {
          continue;
        }
    
        var doc = app.open(file);
        doc.activeLayer.isBackgroundLayer = false;
        var adoc = app.open(afile);
        adoc.selection.selectAll();
        adoc.selection.copy();
        adoc.close(SaveOptions.DONOTSAVECHANGES);
    
        createLayerMask();
        selectMaskChannel();
        doc.paste();
    
        var ofile = new File(ofolder + '/' + file.name);
        ofile.remove();
        doc.exportDocument(ofile, ExportType.SAVEFORWEB, saveOpts);
        doc.close(SaveOptions.DONOTSAVECHANGES);
      }
    };
    function createLayerMask() {
        var desc9 = new ActionDescriptor();
        desc9.putClass( cTID('Nw  '), cTID('Chnl') );
            var ref6 = new ActionReference();
            ref6.putEnumerated( cTID('Chnl'), cTID('Chnl'), cTID('Msk ') );
        desc9.putReference( cTID('At  '), ref6 );
        desc9.putEnumerated( cTID('Usng'), cTID('UsrM'), cTID('RvlA') );
        executeAction( cTID('Mk  '), desc9, DialogModes.NO );
    };
    function selectMaskChannel() {
        var desc26 = new ActionDescriptor();
            var ref18 = new ActionReference();
            ref18.putEnumerated( cTID('Chnl'), cTID('Chnl'), cTID('Msk ') );
            ref18.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
        desc26.putReference( cTID('null'), ref18 );
        desc26.putBoolean( cTID('MkVs'), true );
        executeAction( cTID('slct'), desc26, DialogModes.NO );
    };
    
    main();
    
  • Need help with this calculation

    Hi members,

    Im trying to do some logical columns for calculations. It is a very simple calculation, but I can't seem to make it work in the repository.
    The data upon which I make eyes of calculation as follows.

    Issue Nr. | Question | Meet Nr. | Response | Answers (number of responses)
    1. | Job satisfaction | 1. | Very good | 8
    1. | Job satisfaction | 2 | Good | 2
    1. | Job satisfaction | 3 | Bad | 5
    1. | Job satisfaction | 4 | Very bad. 0

    It is an example of the data. Now, I want to make a logical column to calculate the 'happiness factor '. The formula looks like:

    (Very good + good) / (very good + good + good + bad) * 100 = happiness

    So it would be 10 / 15 * 100 = 66.66.

    Very simple, but I have no idea on how to accomplish this formula in the repository. What I was aiming for in my head, it was something like:

    Select the answers where [answer] Nr. (3,4) / select responses where [answer]. Nr in (1,2) * 100 = :)


    Does anyone know how to do this in the repositroy? It would be highly appreciated.

    Erik.

    Hello

    This happens when we don't know all the facts and we create our scenarios and responses only what we know...

    Now you can do if you do not use 'no opinion' or 'Empty response' in our 'answers' but again to tuition assistance box...

    'All answers worth calculation' =
    case when answer in ('list of what answers I want to aggregate', ((Very) Happy... (Very) Unhappy))
           then 'my new All answers'
           else 'answers I need to ignore'
    end
    

    and our dimmnesion should look like:

    'Type of survey' -> 'Question' -> 'All answers worth calculation' -> Happiness -> Answer
    

    in this case the levels should be no to the 'Question' but to our new "answers a calculation value..."

    So, for an issue with 21 responses it is only 6 entries ((very) happy, (very) unfortunate, Blank, do not know)
    A separate account solves your problem...

    In addition, in your last post I don't understand how you can sum UP non-numerical data (Happy/headaches)
    No aggregate data not digital (Happy/headaches)
    you aggregate your fact group by happiness(Happy/Upset)

    sum ('Table'.) ("' #Answers" by BOX WHEN in Answer (' very good ',' good ') THEN ELSE 'Evils' END 'Happy' *) *.

    I think you've got the ideea of how play with several groups on the same Assembly and how to manipulate BI...
    All you have to do is to play with your data to add or exclude what you need
    If the data is not there you want you allways can create a view in the database or in physical layer so it can help you more.
    On another thing... There is a way to filter data at the logical level at the source of the logical table, the content tab, where clause. Don't say you use here, just give it a shot

    Best regards and fun of it
    Nicolae

  • Need help with Custom Field Layout - getting wirer height value

    In the BB Simulator, I get a strange value placed in in my field layout() method custom. The width is 320, which is correct, but the height is 1073741823 and it takes 240 or less. In this test, my custom field is the only field in the Manager, so I expect to 240.

    I tried two different simulators - BB curve and the 8800. I use JDE 4.5.0 in Eclipse 3.4.1. This is the code for my method of layout:

    Protected Sub layout (int width, int height) {}
    s long = getStyle().
    If ((s & USE_ALL_WIDTH)! = USE_ALL_WIDTH) {}
    width = Math.min (width, getPreferredWidth());
    }
    If ((s & USE_ALL_HEIGHT)! = USE_ALL_HEIGHT) {}
    height = Math.min (height, getPreferredHeight());
    }
    setExtent (width, height);
    model.setExtent (width, height);
    Model.Scroll (0, 0);
    }

    I expect the value of the screen height, or less, if the domain is configured correctly.

    I'm upgrading my custom field in a VerticalField Manager with the following attributes:

    Super (VerticalFieldManager.USE_ALL_WIDTH
    | VerticalFieldManager.USE_ALL_HEIGHT
    | VerticalFieldManager.FIELD_HCENTER | VerticalFieldManager.FIELD_VCENTER);

    Is this a bug in the Simulator, or I understand the API correctly? Is there a way to 'reset' the Simulator - I tried to get out of Eclipse and restart Windows, but I always get the same value.

    Thank you!

    Mark

    A VerticalFieldManager comes, I think, with default VERTICAL_SCROLL.  If you do not want to scroll through this particular Manager, add VerticalFieldManager.NO_VERTICAL_SCROLL to your forests of style and it will be laid out with only the height and the actual width.

    Also, since you setExtent() by yourself, USE_ALL_HEIGHT and USE_ALL_WIDTH are redundant, I think.

    Hope that helps,

    Arkady.

  • Need help with vSphere data script, packaging and sending it to the data warehouse

    Greetings PowerCLI gurus.


    Everyone can offer suggestions on a script which can query vSphere and pull on the following fields of the virtual computer:

    NameStateStatusHostSpace in useSpace used

    Format in a file in the CSV format and send the file to an FTP server?

    Much respect to all, thanks a lot in advance.

    Hello-

    Happy to help you.

    OK, well, if this database is accessible through a UNC path, you might make a copy directly using Copy-Item.  If you use different credentials, you can encrypt and store in an XML file.  HAL Rottenberg wrote to do http://halr9000.com/article/531.

    Or, if this pension data is something that supports the secure copy (scp) or secure FTP (SFTP), those who would be good options.  Again, you can store the alternative credentials in an encrypted in an XML file format and use them as needed.

    Certainly, there is a balance to be struck between security and ease of use.  It may be such that the transmitted data are not considered sensitive to all, and clear data transfers are acceptable.  Probably still a good idea to take measures to protect the credentials at least.

  • Need help with a FormCalc script...

    I have an auto form certain text fields based on a date field. It works fine, but when I open the form, the fields are already filled with a default date when I actually put "Week start" date, he turns into what I want, I don't want the fields to have something in them when the form is opened.  The FormCalc script that I use is the following

    var dateNum = date2num(form1.Checklist.weekStart.formattedValue,"MMMM DD, YYYY")

    $.rawValue = num2date(dateNum,"MM/DD")

    Here is a link to the file itself

    https://DB.TT/UScOAGZr


    We FormCalc, blocking the right controls the drop-down list of the calendar to make sure that they select a Monday.

    I like to put as much of my code that I can in one place, so it is easier to change things. That is why I proposed to do all of the drop-down list calendar.

    So, you could do something like:

    var selectedDate = Date2Num($,"YYYY-MM-DD")
    var dayOfWeek = Num2Date(selectedDate, "E")
    
    if (dayOfWeek <> 2) then
              xfa.host.messageBox("Week Starting must be a Monday")
              $ = null
              xfa.host.setFocus("$")
    endif
    
    Table1.Row1.dayMonday = num2date(selectedDate, "MM/DD")
    Table1.Row1.dayTuesday = num2date(selectedDate + 1, "MM/DD")
    Table1.Row1.dayWednesday = num2date(selectedDate + 2, "MM/DD")
    Table1.Row1.dayThursday = num2date(selectedDate + 3, "MM/DD")
    Table1.Row1.dayFriday = num2date(selectedDate + 4, "MM/DD")
    Table1.Row1.daySaturday = num2date(selectedDate + 5, "MM/DD")
    Table1.Row1.daySunday = num2date(selectedDate + 6, "MM/DD")
    

    (I dissociated from the first table that it was originally the need to use xfa.resolvenodes.)

  • Need help with custom class main event to a class not related.

    Hey guys,.

    I am new to Flash and not very well with OOP.  I did it pretty far with google and hidden, but I was pulling my hair on this problem for a day and everything I try get an error or just simply don't touch the listener.

    I'm trying to get my main class to send an event customized to an unrelated class called BigIcon.  The rest of the code works fine, it's just the addEventListener and dispatchEvent method that does not work.

    I put in the codes below.  Let me know if something else is needed to solve the problems.  Thank you!

    Main.As

    package 
    {
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
    
    
        public class Main extends MovieClip
        {
            var iconLayer_mc:MovieClip = new MovieClip();
    
            public function Main()
            {
                Spin_btn.addEventListener(MouseEvent.CLICK,fl_MouseClickHandler);
    
                addChildAt(iconLayer_mc,0);
                placeIcons();
            }
    
            function placeIcons():void
            {
                var i:int;
                var j:int;
    
                for (i = 0; i < 4; i++)
                {
                    for (j = 0; j < 5; j++)
                    {
                        //iconString_array has the names of illustrator objects that have been converted to MovieClips and are in the library.
                        var placedIcon_mc:BigIcon = new BigIcon(iconString_array[i][j],i,j);
                        iconLayer_mc.addChild(placedIcon_mc);
                    }
                }
            }
    
            function fl_MouseClickHandler(event:MouseEvent):void
            {
                dispatchEvent(new Event("twitchupEvent",true));
            }
        }
    }
    

    BigIcon.as

    package 
    {
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.utils.getDefinitionByName;
    
        public class BigIcon extends MovieClip
        {
            private var iconImage_str:String;
            private var iconRow_int:int;
            private var iconColumn_int:int;
    
            public function BigIcon(iconImage_arg:String, iconRow_arg:int, iconColumn_arg:int)
            {
                iconImage_str = iconImage_arg;
                iconRow_int = iconRow_arg;
                iconColumn_int = iconColumn_arg;
    
                this.addEventListener(Event.ADDED_TO_STAGE, Setup);
    
            }
    
            function Setup(e:Event)
            {
    
                this.y = iconRow_int;
                this.x = iconColumn_int;
    
                var ClassReference:Class = getDefinitionByName(iconImage_str) as Class;
                var thisIcon_mc:MovieClip = new ClassReference;
                this.addChild(thisIcon_mc);
    
                addEventListener("twitchupEvent", twitchUp);
            }
    
            function twitchUp(e:Event)
            {
                this.y +=  10;
            }
        }
    }
    

    This could be a bit abstract to understand, but think about what you assign event listeners to when you implement the.

    When you want to have a function to respond to a button that is clicked, what do you attribute the event listener to?  She is assigned to the object that generated the event, the button.

    In your case the main class generates the event.

    You could take a different route with this, where if all your BigIcon objects were stored in a table in the main class, you could loop through that array and manage your contractions without having to have every BigIcon object involved in this transformation.

  • Need help with changing PowerCLI script to get the interface driver NETWORK &amp; firmware version?

    Hi all

    mattboren created the script below for a list of BIOS hardware version and firmware version:

    ## Script function: quickly get BIOS date, Smart Array FW version, and iLO FW version for HP hosts in a given location (folder, cluster, datacenter, etc.)
    ## Author: vNugglets.com -- Sep 2011
    
    ## folder in which hosts in which we are interested reside
    #$strHostsFolderName = "myFolder"
    #Get-View -ViewType HostSystem -Property Name, Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo -SearchRoot (Get-View -ViewType Folder -Property Name -Filter @{"Name" = "^$([RegEx]::escape($strHostsFolderName))$"}).MoRef | %{
    ## cluster in which hosts in which we are interested reside
    
    $strHostsClusterName = "Production"
    Get-View -ViewType HostSystem -Property Name, Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo -SearchRoot (Get-View -ViewType ClusterComputeResource -Property Name -Filter @{"Name" = "^$([RegEx]::escape($strHostsClusterName))$"}).MoRef | %{
        $arrNumericSensorInfo = @($_.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo)
        # HostNumericSensorInfo for BIOS, iLO, array controller
        $nsiBIOS = $arrNumericSensorInfo | ? {$_.Name -like "*System BIOS*"}
        $nsiArrayCtrlr = $arrNumericSensorInfo | ? {$_.Name -like "HP Smart Array Controller*"}
        $nsiILO = $arrNumericSensorInfo | ? {$_.Name -like "Hewlett-Packard BMC Firmware*"}
        $nsiNXdev = $arrNumericSensorInfo | ? {$_.Name -like "nx_nic device*"}
        $nsiNXdrv = $arrNumericSensorInfo | ? {$_.Name -like "nx_nic driver*"}
    
      if ( $nsiNXdev.Count -gt 0 ) {
           $nsiNXdevice = $nsiNXdev[0].Name
      } else {
           $nsiNXdevice = "n/a"
      }
      if ( $nsiNXdrv.Count -gt 0 ) {
           $nsiNXdriver = $nsiNXdrv[0].Name
      } else {
           $nsiNXdriver = "n/a"
      }
    
        New-Object PSObject -Property @{
            VMHost = $_.Name
            "SystemBIOS" = $nsiBIOS.name
            "HPSmartArray" = $nsiArrayCtrlr.Name
            "iLOFirmware" = $nsiILO.Name
            "nx_nic device" = $nsiNXdevice
            "nx_nic driver" = $nsiNXdriver
        } ## end new-object
    } | Export-Csv C:\temp\Production-BLadeG7.csv  ## end Foreach-Object
    
    
    
    
    

    However, I would like to change the driver for the CARD and the version of the firmware but still appear.

    Any kind of help and suggestions would be greatly appreciated.

    Thank you.

    Try like this

    $strHostsClusterName = 'production '.

    Get-view ViewType - HostSystem-Property Name, Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo - SearchRoot (Get-View - Name ClusterComputeResource-property - ViewType filter @{'Name' = ' ^ $([RegEx]: escape ($strHostsClusterName)) $"" "}). MoRef | %{

    $arrNumericSensorInfo = @($_.) Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo)

    # HostNumericSensorInfo for controller table of BIOS, ILO,

    $nsiBIOS = $arrNumericSensorInfo |? {$_. {Name: like "* system BIOS *"}

    $nsiArrayCtrlr = $arrNumericSensorInfo |? {$_. {Name - like "HP Smart Array Controller *"}

    $nsiILO = $arrNumericSensorInfo |? {$_. {Name - like "Hewlett-Packard BMC Firmware *"}

    $esxName = $_. Name

    $esxcli = get-EsxCli - VMHost $_. Name

    $esxcli.network.nic.list () | %{

    $esxcli.network.nic.get ($_.) Name) | %{

    $props [ordered] = @ {}

    VMHost = $esxName

    "SystemBIOS" = $nsiBIOS.name

    "HPSmartArray" = $nsiArrayCtrlr.Name

    "iLOFirmware" = $nsiILO.Name

    "nx_nic device" = $_. Name

    'nx_nic pilot' = $_. DriverInfo.Driver

    "nx_nic driver version" = $_. DriverInfo.Version

    "nx_nic firmware version" = $_. DriverInfo.FirmwareVersion

    } # end new object

    New-object PSObject-property $props

    }

    }

    } | Export-Csv C:\temp\Production-BLadeG7.csv # end Foreach-Object

  • Need help with box counting Script

    He had to count the number of boxes checked. I use the script below and its does not work. What I am, I am doing wrong? It drives me crazy.

    /*

    document level function to calculate the sum of the fields named

    Function Sum (aFieldNames) {}

    var sum = 0; sum of values

    Browse fields

    for (var i = 0; i < aFieldNames.length; i ++) {}

    If (!) IsNaN (this.getField(aFieldNames[i]).value))

    sum += Number (this.getField(aFieldNames[i]).value).

    }

    to return the sum;

    } / / end of the sum function

    */

    Bay of somme of domain names

    var aCheckBox = new Array ("check Box5', 'Check Box8', 'Vérifier Box11', 'Check Box16', 'Check Box19', 'Check Box22', 'Check Box25', 'Check Box28', 'Check Box31', 'Check Box34', 'Check Box37', 'Check Box40', 'Check Box43', 'Check Box46', 'Check Box49', 'Check Box52', 'Check Box55', 'Check Box58', 'Check Box61', 'Check Box64', 'Check Box68'");

    sum, named fields

    Event.Value = Sum (aCheckBox);

    Then why you check if they are several using the isNaN function and then try to add this number to the sum variable? Looks like you just copy the code, even if it does not apply to your situation.

    Replace these two lines of code with this:

    If (this.getField(aFieldNames[i]).value! = "Off") sum ++;

  • I need help with my first Script in AE CS5

    Hello fellow designers out there.

    I'm newbie on AE Scripting here. I run my CS 5 on Win 7. I'm trying to create a simple solid GUI and it controls opacity by cursor. I fail and do not now how it work. Here is the code that I have written in reference to many sources and tutorials:

    myComp = app.project.item (1); akses comp 1

    mySolid = myComp.layers.addSolid ([1.0,1.0,0], 'my place', 50, 50, 1); solid

    var myWin = new window ("palette", "Transform", undefined); create the palette

    myWin.orientation = "row";

    var myOpacity = myWin.add ('Committee', undefined, "Strong opacity");

    myOpacity.orientation = "column";

    myOpacity.add ("statictext", undefined, "Opacity Kontrol");

    var opacitysliderCtrl = myOpacity.add ("slider", undefined, 50, 0, 100); make cursor

    var layerOpacity = mySolid.property ("opacity");

    opacitysliderCtrl.onChanging = function()

    {

    var val = Math.round (opacitysliderCtrl.value);

    layerOpacity.value = val;

    };

    myWin.center ();

    myWin.show ();

    Please, help me to see the problem here. Thank you

    There is more harm than good in your work

    At the moment you script attached a slider to a single layer (mySolid, that you add at the beginning).

    This is not very useful, that you cannot use this slider for the other layers.

    You should also keep in mind that this solid can be deleted, so the mySolid object may become invalid (referring to a solid that no longer exists).

    I don't know what, exactly, is your plan, but a script has generally not set anything related to AE in his many body (at launch).

    Only when the user clicks/change a widget script tries to extract a model, layer, property, or anything that the user specified by "a kind of secret code" (most of the time: the model, property, layer, etc. is selected).

    If you want the slider to control the opacity value of all selected layers in the active model, it would be something like this:

    var myWin = new Window("palette", "Transform", undefined); //create pallete
    myWin.orientation = "row";
    
    var myOpacity = myWin.add("panel", undefined, "Solid Opacity");
    myOpacity.orientation = "column";
    
    myOpacity.add("statictext", undefined, "Kontrol Opacity");
    
    var opacitysliderCtrl = myOpacity.add("slider", undefined, 50, 0, 100);//make slider
    opacitysliderCtrl.onChanging = function onOpacitySliderChanging(){
    
            // retrieve the AE things that have to be handled: in this case, all selected layers in the active comp
            var myComp, myLayer, n;
            var layerOpacity, val;
    
            myComp = app.project.activeItem;
            if (myComp.numLayers>0){
                for (n=0; n
    

    Xavier

  • Need help with custom roles

    Hello

    Ive been charged with leading a small project... Here's the scenario:

    We have 25 shared Lun connected to each host in a cluster. The LUNS are labeled & lt; The names of LUN & gt; _Windows or Linux.

    What I want to do a role where only the team the team of linux or windows only would see their LUNS and not other teams lun.

    Is it possible... ??

    Thank you in advance.

    Navigate to the folder create, click permissions and ADD to assign the role to the folder.

    You can use custom (expand all topics and select you want) role, and no (default) access

    If you have found this information useful, please consider awarding points to 'Correct' or 'Useful'*.

Maybe you are looking for

  • Since the last update browser is not the icon of firefox so no menu

    Everything worked great before updating 29,0, since downloading the Firefox in my browser icon is missing, the page shows no sign that I'm in Firefox, even though everything else seems always the same than before. I need help to get the page to its n

  • Crash in com.apple.vImage of iWork, Contacts applications code

    For a little over a week now, I'm getting crashes of multiple applications: iWork applications like Contacts on my iMac with OS X 10.11.4. my other Macs are not affected. Accidents happen shortly after the start and have a similar stack trace. I firs

  • Can Tecra 9100-how I update the graphics card?

    Hallo, I have a S3 Graphics Supersavagecard 16.0 MB display memory. It is not enough to play a game. How can I upgrade or buy nested one? Hope you can help me.Thank youFabidou

  • How to 'book' an Ethernet cDAQ chassis based in software without using MAX?

    I am using a cDAQ 9188 with Ethernet interface. It works fine, but the Setup is a little more than I like for end-users. Users are all first go to MAX and do make a connection. After that, users must 'reserve' the chassis to ensure access to it. This

  • Pass Variables through case

    Hello! I'm writing a VI to control the material through a GPIB communication. The communication goes well. However, I would change that control vi is enabled for the user based on 'mode', the user selects. This mode is 1 in 3, and it would be determi