How to create an collection/array/object/thingy from a bunch of objects for eventual export to CSV.
This is a follow-up to an earlier post (How
to output a bunch of variables into a table.) Now that I can ouput data for a single computer I need to to do the same for a list of computers into a CSV. In more general terms how do I get a bunch of $Computer objects into a single collection/array/object/thingy
with a clever name like $Computers?
# http://ss64.com/ps/get-wmiobject-win32.html
# http://social.technet.microsoft.com/Forums/en-US/da54b6ab-6941-4e45-8697-1d3236ba2154/powershell-number-of-cpu-sockets-wmi-query?forum=winserverpowershell
# http://serverfault.com/questions/10328/determine-cpu-processors-vs-sockets-though-wmi
# http://social.technet.microsoft.com/Forums/windowsserver/en-US/8443fcfd-5a0b-4c3d-bda7-26df83d2ee92/how-to-output-a-bunch-of-variables-into-a-table?forum=winserverpowershell
Param(
[Parameter(Mandatory=$false,ValueFromPipeline=$true)]
[string]$ComputerName = $env:COMPUTERNAME,
[Parameter(Mandatory=$false,ValueFromPipeline=$false)]
[ValidateScript(
If ( $_ -ne $null ) { Test-Path $_ }
[String]$ComputerListFile
Function Get-Computer
Param(
[string]$ComputerName
$Win32_PingStatus = $null
$Win32_PingStatus_Result = $null
$Win32_OperatingSystem = $null
$Win32_Processor = $null
$Win32_PhysicalMemory = $null
$Win32_ComputerSystem = $null
$Win32_BIOS = $null
$Computer = $null
$Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
$Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
If ( $Win32_PingStatus_Result.protocoladdress )
"$ComputerName ping succeeded."
$Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
If ( $Win32_OperatingSystem -eq $null)
"$ComputerName WMI failed."
} Else {
"$ComputerName WMI succeeded."
$Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
$Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
$Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
$Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
$Computer = New-Object -Type PSObject -Property @{
Name = $Win32_OperatingSystem.CSName
Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
#Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
#Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
#Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
#Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
Win32_Processor_Count = [int]$Win32_Processor.Count
Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
#Win32_Processor_Description = [string]$Win32_Processor[0].Description
Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
Win32_Processor_Name = [string]$Win32_Processor[0].Name
} ## end new-object
$Computer
} Else {
"$ComputerName ping failed."
$ComputerNameMgmt = $ComputerName + "-mgmt"
$Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerNameMgmt'"
$Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
If ( $Win32_PingStatus_Result.protocoladdress )
"$ComputerNameMgmt ping succeded."
} Else {
"$ComputerNameMgmt ping failed."
"$(Get-Date -Format o) Starting script $($MyInvocation.MyCommand.Name)"
If ( $ComputerListFile -eq $null -or $ComputerListFile.Length -eq 0 )
"Processing computer $ComputerName"
Get-Computer( $ComputerName )
} Else {
"Processing computer list $ComputerList"
$ComputerList = Get-Content $ComputerListFile
$Computers = @{}
$Results = @()
ForEach( $ComputerListMember in $ComputerList )
"$(Get-Date -Format o) $ComputerListMember"
# Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
# http://social.technet.microsoft.com/Forums/windowsserver/en-US/e7d602a9-a808-4bbc-b6d6-dc78079aafc9/powershell-to-ping-computers
# $Compuers += New-Object PSObject -Property $Props
# $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
Get-Computer( $ComputerListMember )
"$(Get-Date -Format o) Ending script $($MyInvocation.MyCommand.Name)"
If I try something like this:
Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
I get the following, even though $_.Name is not null.
Add-Member : Cannot bind argument to parameter 'Name' because it is null.
At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:111 char:107
+ Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name <<<< $_
+ CategoryInfo : InvalidData: (:) [Add-Member], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand
Or if I try this:
$Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
I get this:
New-Object : Cannot bind parameter 'Property'. Cannot convert the "Get-Computer" value of type "System.String" to type "System.Collections.Hashtable".
At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:114 char:47
+ $Computers += New-Object PSObject -Property <<<< Get-Computer( $ComputerListMember )
+ CategoryInfo : InvalidArgument: (:) [New-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.NewObjectCommand
Hi Aenagy,
If you want to combine all the computers' information to a single array, and add the property computername in the output, please also try the script below, which I make a little modification of the function Get-Computer, pleaese make sure the account running
the script has the admin permission of the remote computers, or you need to privide cridentials in get-wmiobject, also note I haven't tested:
$output = @()#to output information of the all the computers
ForEach( $ComputerName in $ComputerList ){#loop all the computers
$Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
$Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
If ( $Win32_PingStatus_Result.protocoladdress )
"$ComputerName ping succeeded."
$Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
If ( $Win32_OperatingSystem -eq $null)
"$ComputerName WMI failed."
Else {
"$ComputerName WMI succeeded."
$Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
$Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
$Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
$Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
$Computer = New-Object -Type PSObject -Property @{
Computername = $ComputerName #add the property computername
Name = $Win32_OperatingSystem.CSName
Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
#Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
#Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
#Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
#Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
Win32_Processor_Count = [int]$Win32_Processor.Count
Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
#Win32_Processor_Description = [string]$Win32_Processor[0].Description
Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
Win32_Processor_Name = [string]$Win32_Processor[0].Name
} ## end new-object
$output+=$Computer #combine all the "$computer" to "$output"
Else {
"$ComputerName ping failed."
$output
If you have any feedback on our support, please click here.
Best Regards,
Anna
TechNet Community Support
Similar Messages
-
How to create a new variant and a job sheduled to use it for the exisisting programs
Hi
1. The ALV Grid Control is a tool with which you can output non-hierarchical lists in a
standardized format. The list data is displayed as a table on the screen.
The ALV Grid Control offers a range of interactive standard list functions that users need
frequently (find, sort, filter, calculate totals and subtotals, print, print preview, send list,
export list (in different formats), and so on. These functions are implemented in the
proxy object class. You as the programmer have the possibility to turn off functions not
needed. In most cases the implementations of the standard functions provided by the
control are sufficient. However, if required, you can adjust these implementations to
meet application-specific needs.
You can add self-defined functions to the toolbar, if necessary.
The ALV Grid Control allows users to adjust the layout of lists to meet their individual
requirements (for example, they can swap columns, hide columns, set filters for the
data to be displayed, calculate totals, and so on). The settings (list customizing) made
by a specific user are called a display variant. Display variants can be saved on a userspecific
or on a global basis. If such display variants exist for a list, they can be offered
to the user for selection. If a display variant is set as the default variant, the associated
list is always displayed based on the settings of this variant.
2. REUSE_ALV_LIST_DISPLAY
REUSE_ALV_GRID_DISPLAY
REUSE_ALV_FIELDCATALOG_MERGE
REUSE_ALV_COMMENTARY_WRITE
3. Use of Field Catalog is to determines the technical properties & add formating information of the column.
6. all the definition of internal table, structure, constants are declared in a type-pool called SLIS.
7.fieldcat-fieldname
fieldcat-ref_fieldname
fieldcat-tabname
fieldcat-seltext_m
5. Form user_command using r_ucomm like sy-ucomm rs_selfield type slis_selfield.
Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length.
In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output.
The report output can contain up to 90 columns in the display with the wide array of display options.
<b>The commonly used ALV functions used for this purpose are;</b>
1. REUSE_ALV_VARIANT_DEFAULT_GET
2. REUSE_ALV_VARIANT_F4
3. REUSE_ALV_VARIANT_EXISTENCE
4. REUSE_ALV_EVENTS_GET
5. REUSE_ALV_COMMENTARY_WRITE
6. REUSE_ALV_FIELDCATALOG_MERGE
7. REUSE_ALV_LIST_DISPLAY
8. REUSE_ALV_GRID_DISPLAY
9. REUSE_ALV_POPUP_TO_SELECT
Purpose of the above Functions are differ not all the functions are required in all the ALV Report.
But either no.7 or No.8 is there in the Program.
<b>
How you call this function in your report?</b>
After completion of all the data fetching from the database and append this data into an Internal Table. say I_ITAB.
Then use follwing function module.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'Prog.name'
I_STRUCTURE_NAME = 'I_ITAB'
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = I_ITAB.
IF SY-SUBRC <> 0.
WRITE: 'SY-SUBRC: ', SY-SUBRC .
ENDIF.
ENDFORM. " GET_FINAL_DATA
The object F_IT_ALV has a field, the activity ACTVT, which can
contain four permitted values: 01, 02, 03 and 70. Each of the
activities 01, 02 and 70 controls the availability of particular
functions (in the menu and the toolbar) of the ALV line item list:
a) 01: "Settings -> Display variant -> Save..."
b) 02: "Settings -> Display variant -> Current..." and
"Settings -> Display variant -> Current header rows "
c) 70: "Settings -> Display variant -> Administration..."
Activity 03 corresponds to the minimum authorization, which is the
most restricted one: The user can only select layouts which have
been configured already. In particular, all of the other functions
named above are inactive with activity 03.
Now if you want to permit a user to change the column selection and
the headers as well as to save the layout thus created, for example,
but if you do not want to permit the user to administrate the
layouts, you grant him or her the authorization for activities 01
and 02.
Check this link it will be mosty usefull for u
http://www.sap-img.com/fu017.htm
Reward all helpfull answers
Regards
Pavan -
How to create a Blanket Release in iProc from a approved requistion
Hi Gurus,
How to create a blanket Release in iProcurement from a approved requisition. I have followed the below steps.
1. Created a BPA from Front end.
2. Run Loader Data program.
3. Above program reflected the BPA in iProc.
4. Created requisition from BPA.
5. Requisition has been approved.
After this i am stuck. How to proceed ahead. I want to create a Blanket Release from approved PR and then receive in iProcurement.
please help me on this. We are using 11.5.10.2
Regards,
john911765 wrote:
Hi Mahendra,
Thank you so much for your reply.
So you mean to say that it all depends upon the Sourcing Rule and ASL based upon that system would automatically create a Blanket Release or If its Automatic Release/Review then we have to manually create release through autocreate.
The reason why i am asking this query is now when i tested it, system is automatically creating release and starngely there is no Sourcing Rule and ASL has been defined.
But we are looking for a Manual Release through autocreate window.
It would be great if you could please suggest.
Regards,
JohnJohn,
When you say system is automatically creating release..as far as i know...it should be referencing a PO..correct...in the releases window..
can you pull that up..and see if you can get any clue..bcz that PO would BPA...
Also I am not that much into Iproc...I don't know...whether Iproc has some other setups
HTH
Mahendra -
How to create pdf files in UNIX directory from oracle reports
I would like to know how to create pdf files in UNIX directory from oracle reports.
Thanks,Please make your question more clear . Also mention the reports version.
1) If you are runnning reports in Unix, you can give
.... destype=file desformat=pdf desname=<filename>
in command line
Please refer docs below.
2) If by your question you mean
"My reports server is running in Windows but I want to ftp my files to Unix after creating it"
then the answer is that you can use pluggable destination "ftp"
.... destype=ftp desformat=pdf desname=<ftp url>
Pluggable destinations download
http://otn.oracle.com/products/reports/pluginxchange/index.html
Thanks
Ratheesh
[ All Docs ]
http://otn.oracle.com/documentation/reports.html
[ Publishing reports to web - 10G ]
http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
[ Building reports - 10G ]
http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
[ Forms Reports Integration whitepaper 9i ]
http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf -
How to create a service entry sheet based from the PO
how to create a service entry sheet based from the PO
Gurus,
I am creating a service entry sheet from the PO but I am getting an error of u201CPlease maintain services or limits Message no. SE029- Diagnosis(You cannot enter data until the PO item has been maintained correctly) u201C
The document type of the PO is standard NB, account assignment category is Q- (Proj make to order) and the item category is D(service). Then I am trying also create a PR using account assignment category is Q- (Proj make to order) and the item category is D(service) but still cannot proceed, a message asking me to enter a service entry number. What I know the process is create a PO(maybe based from PR) then post the GR then create a service entry sheet in ML81N but I cannot proceed. Just creating a PR or PO using those mentioned account assignment and item category and getting an error of need to enter a service entry sheet number.
Please help.thanks!HI,
Process for Creating Service Entry Sheet
Transaction Code : ML81N
1)To open the respective Purchase Order, Click on the u2018Other Purchase Orderu2019, then enter the Purchase Order No.
2)Click on the u2018Create Entry Sheetu2019 icon(3rd Icon on Top-Left)
3)Give Short Text (e.g. R/A Bill No. 1) and top service entry sheet number also generated.
4)Click u2018Service Selectionu2019 Icon on the Bottom of the Screen.
5)For the 1st Time, when we are making Service Entry Sheet for a respective Purchase Order, we need to u201CAdopt Full Quantityu201D by clicking the Check box next to it, then Enter. (*For the next time, no adoption is required, just continue)
6)Select the respective Services by clicking on the Left Hand Side, then Click u2018Servicesu2019 (Adopt services) icon on the Top.
7)Give the completed Quantity, then Click u2018Acceptu2019 icon(a green flag on the top)
8)Save .
9)Service Entry Sheet is SAVED and account posting made.
Hope, it is useful for you,
Regards,
K.Rajendran -
How to create an new array from dynamically discovered type
public static Object toAdjustedArray(Object source, Object addition,
int colindex, int adjust) {
int newsize = 0;
Class componentType = null;
if (source.getClass().isArray()) {
Object[] arrayIn= (Object[])source;
componentType = arrayIn[0].getClass();
newsize = arrayIn.length + adjust;
else {
System.out.println("error in ArrayUtil");
Object[] newarray = new Object[newsize];
copyAdjustArray(source, newarray, addition, colindex, adjust);
return newarray;
}This methods take an array as an input an append new value(s) to it.
I can get the component type of the array (i.e. the class of the array's member). But how can I create a new array of this component type (i.e doing something like componentType[] newarray = new componentType[newsize])?
CU JeromeI fanally found a walkaround trick for my problem.
Their is no way to create an array of a certain type (dynamically dsicovered) in CLDC. But what you can do is to use the instanceof method to determine the type of your array and in a big if statement create the right array.
Here is the final code:
public static Object toAdjustedArray(Object source, Object addition,
int colindex, int adjust) {
int newsize = 0;
if (source.getClass().isArray()){
Object[] arrayIn= (Object[])source;
newsize = arrayIn.length + adjust;
Object arrayElement = null;
if (addition.getClass().isArray()){
Object[] temp = (Object[])addition;
arrayElement = temp[0];
else{
arrayElement = addition;
Object newarray = null;
if (arrayElement == null){
newarray = new Object[newsize];
if (arrayElement instanceof org.hsqldb.Index){
newarray = new org.hsqldb.Index[newsize];
else {
newarray = new Object[newsize];
copyAdjustArray(source, newarray, addition, colindex, adjust);
return newarray;
} -
How to create oracle.sql.array
I need to create an oracle.sql.array to pass in my custom objects array to the database. I know you can create it using the ArrayDescriptor class but the problem with that is the connection object is need.
I am using the writeSql() method of the SQLData interface. I therefore dont have the connection object. Any ideas?haha
you misunderstand. i have in my code:
<code>
// update the organisation
public boolean setOrganisation(Organisation pOrg) {
Organisation org = pOrg;
OracleCallableStatement callStat = null;
Connection conn = null;
boolean OK = false;
try {
conn = getConnection(getUserName());
pOrg.setConnection(conn);
callStat = (OracleCallableStatement) conn.prepareCall("{call p_cmt.update_organisation(?)}");
callStat.setObject(1, org);
callStat.execute();
OK = true;
} catch (Exception e) {
logger.severe("error writing organisation with id " + org.getId() + ". " + e);
} finally {
cleanUpConnections(conn, callStat);
return OK;
</code>
This writes the object organisation to the database. Now in the class organisation i have the following method which is called automatically when writing the organisation object to the database:
<code>
public void writeSQL(SQLOutput p_stream) throws SQLException {
p_stream.writeInt(id);
p_stream.writeObject(country);
if (finIndexArr == null)
finIndexArr = new ListElement[0];
ArrayDescriptor af = ArrayDescriptor.createDescriptor(
ObjectMapper.elementList, conn);
ARRAY arr = new ARRAY(af, conn, finIndexArr);
p_stream.writeArray(arr);
</code>
The problem is the last bit. To put the finIndexArr into an array i need the connection object. So i have to pass into the organisation object the connection object which seems unneccessary and pointless to me. I was just looking at an alternative way of creating the array without the need of the connection object. Since the setOrganisation() above has the connection to the database i dont see why i need to specify it in the array as well -
Low-end RAID - Ugh (Or how to create partition level arrays)
Ok... I got a new mobo and my system is up and running!
Now let me tell you how I "want" to configure my drives.
I have two Hitachi 160 SATA drives. I would like to create two RAID partitions. Configured like so:
SATA1 SATA2
20GB + 20GB @ Mirrored = 20GB C: (For Windows, etc.) (Safe)
140GB + 140GB @ Stripped = 280GB D: (For everything else ) (Fast)
The problem is that the stupid Nvidia RAID BIOS only seems to support creating drive level arrays and not partition level!
I only have expierence with high-end server RAID controllers and doing what I have layed out is perfectly possible. Is this just something that "low-end" RAID controllers do not support?
Thanks!Unfortunatly that is true, this controller does not support partition level arrays, only disc level.
Be well.... -
How to create a list/array off numbers with boolean attributes
Hi,
Maybe the title doesn't explain this too well but what I'm trying to do I'd imagine should be straight forward, I just don't know how!
I want an array of numbers to be entered by a user, and for each of these numbers I wish to have a boolean, (it will select later what action is performed on that number)
The array size can vary
e.g.
element Numeric Value Boolean
0 5 True
1 20 True
2 -5 False
3 10 True
n 100 False
I don't see any list with numeric and boolean, maybe I just haven't spotted it or do I have to make it somehow?
Any suggestions please?
Thanks!
p.s. if anyone else is using Opera Browser to post here, hitting enter work properly for ye when entering text? For me it causes the cursor to go up one line instead of down! Drives me nuts! It only happens with this NI forum
Solved!
Go to Solution.Hi thanks for the reply,
It not really what I'm looking for though.
I require is a control that inputs both numeric and boolean, as in the example I mentioned. I guess I'm looking for a cluster really but I thought there may be something more straight forward.
From the example I gave
Element 0 of this array has been entered as a x, and the boolean True was entered (so I perform a "test" A on value x)
Element 1 of this array has been entered as a y, and the boolean True was entered (so I perform a "test" A on value y)
Element 2 of this array has been entered as a z, and the boolean False was entered (so I perform a "test" B on value z)
I could also use a 2d array were I enter another numeric value (0/1 for False/True) but I'm not sure I can limit this column only to accept 0 or zero and the first row any number.
I was hoping there would be some easier way to do this -
How to create a collection using the Reader for PC or Reader for Mac software.
Solved!
Go to Solution.A collection is a custom set of books and other items that you create from items on the Reader or the library of the Reader™ for PC or Mac® software. It is a unique and convenient way to organize your items. You can organize and personalize your content by creating collections by subject matter, date, genre or anything that best suits your purpose.
Create a collection:
Click the My Library tab.
On the category bar, click Collections.
Click the Create New Collectionbutton.
Enter a collection name and then press Enter on your keyboard. A new collection will be added to the Collections list.
Add books to the collection:
Once you have created the collection, click the My Librarytab.
On the category bar, click to select the book you want to add to the collection. Multiple books can be selected by holding down the Ctrlkey while clicking on the books.
With the book(s) selected, at the bottom of the screen, click the Add to Collectionbutton.
From the menu that pops up, click to select the collection you want to add the book(s) to.
NOTE: The next time you sync your Reader Digital Book, the collection and its contents will be added to your Reader device. -
How to create a table in MS Access from Labview using ActiveX?
I want to transfer datas from Labview to Access using activeX method. My only problem is to find out how to create a new table (array) in Access from the Labview program.
Remarks: I use Labview 6i and MS Access 2000.
For the moment I can write and read datas of Access from Labview.
If someone could help me... that would be grate!This is off the Microsoft MSDN site "creating an external table". I think you can drop the last step.:
Open the database you want to create the table in. If it is the current database, use the CurrentDb function to return an object variable that represents the current database. If it isn�t the current database, use the OpenDatabase method to open the database you want.
Use the CurrentDb function to create a Database object that points to the current database.
Use the CreateTableDef method of the Database object to create a table definition for the Microsoft Access table.
Use the CreateField method of the TableDef object to create one or more fields in the Microsoft Access table.
Use the Append method of the Fields collection to add the new field or fields t
o the Microsoft Access table.
Use the Append method of the TableDefs collection to create the Microsoft Access table.
Use the TransferDatabase method to create the external table in the specified folder.
Use the Delete method of the TableDefs collection to delete the Microsoft Access table definition. -
How to create a smallest file size pdf from indesign CS4 document
How to create a smallest file size pdf (suitable for upload to a website) from indesign CS4 document which contains multiple illustrator CS4 illustrations.
I have chosen the "smallest file size option" but the pdf file is over 30MB, can anyone help please.
Thank youOne trick is to
Set the placed graphics to have a transparency of 99.9% (you can do this with Find/Change and select Objects)
This is enough to force the graphics throught the Transparency Flattener
Next set the Transparency Blend Space to RGB (Edit>Transparency Blend Space)
Next set a custom Transparency Flattner Preset Edit>Transparency Flattner
Next
Use File>Export and choose
Smallest file size
PDF Compatibility Acrobat 4 (PDF 1.3)
In Advanced Section - go to transparency and selec the new Flattener Preset you created.
*this will convert your vectors to raster, but it should reduce your file size -
How to create an SPList by adding SPListItems from List SPListItem ?
Hi there,
I have List<SPListItem> as below that contains many SPListItems.
List<SPListItem> Output = new List<SPListItem>();
How to create an SPList or SPLIstItemCollection from above please?
Thank you so much.Hi Frob,
Thanks for posting this issue, Kindly find the below mentioned steps. I hope you should be able to create a new collection.
Get a instance of the list you want to add the item to.
Add a new item to the list:
SPListItem newItem = list.AddItem();
To bind you new item to a content type you have to set the content type id for the new item:
newItem["ContentTypeId"] = <Id of the content type>;
Set the fields specified within your content type.
Commit your changes:
newItem.Update();
I hope this is helpful to you. If this works, Please mark it as
Answered.
Regards,
Dharmendra Singh (MCPD-EA | MCTS)
Blog : http://sharepoint-community.net/profile/DharmendraSingh -
How to create web part and retrieve data from a scheduled task?
Hi,
I am new to SP, so I think you can guide me. I have a scheduled task which gets currency data. I wonder if there is way to show them on a web part. There will be currnecy names, buy and sell data on this web part. I would be glad if you can show
me step by step how to create this web part on SP.
Thanks in advance.
Best Regards.Hi,
thanks for the reply so I advice on that case to write code in the task schedule to write the data into a SharePoint list, if the scheduled task is on the same server as SharePoint then use Object model if it on another server then use client object model
to write data to a list
then on SharePoint site you will just add out of the box web part to display the list where you stored the data
to save data using Object model:
http://msdn.microsoft.com/en-us/library/office/ms467435(v=office.14).aspx
http://www.go4sharepoint.com/Code/insert-list-item-sharepoint-object-286.aspx
to save data using client object model
http://www.codeproject.com/Articles/268196/SharePoint-Client-Object-Model
Kind Regards,
John Naguib
Technical Consultant/Architect
MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation
Please remember to mark your question as answered if this solves your problem -
How to create a new view by copying from standard view in IC webclient?
Hello, expert,
I need to enhance a sap standard component (BP_Factsheet), inside it I need to create a new view by copying from an existing standard view (Acitivities). However when I try to make a copy, I was asked for destination BSP application, I entered the Z-Application which I used when defining enhancement for the component. After the copy, I don't see the new view.
Then I tried the destination BP_factsheet, instead of the z-application, then after the copy, I can see the new view. However since it's in SAP application, it seems like it's a MOD, not enhancemnet, and inside the new view, the classes (for context, context nodes, etc.) are not in custom namespace (not starting with Z).
So please let me know how can I make a copy of sap standar view in custom namespace.
Thanks in advance.
JaysonWhen copying you can put any BSP name..normally the practice is to prefix the standard name with a Z.
Secondly when you want to make changes to the individual classes and methods you need to right click and say enhance. Then the AZ class names etc would be generated. The view should appear in the component wherein you copied the original view from.
I hope this helps.
The cookbook should have details on this. Otherwise also its quite intuitive.
Award points if it helps.
Thanks.
Maybe you are looking for
-
After installing, whenever i try to open the application, it keeps popping up that some or the other .dll file is missing. When I install that particular .dll file and then again try to re open, it says that someother file is missing. It keeps coming
-
How to sinc my address book from my apple computer to my iPad
I have an iPad mini and only have about 6 contacts showing, not sure why. I want to have my entire address book on my mini. How can I do that?
-
Already Cleared Customer Items on Incoming Bank Statement
Please advise on how to treat the below: 1. A Customer Invoice is Cleared by a Cash Payment at the Cash desk. This CR- Customer and DR- Bank Clearing Account. 2. The money comes in on the Electronic Bank Statement on a Business Transaction Code (BTC)
-
How to use collect statement for below
data : begin of itab, n(3) type c, n1 type n, k(5) type c, end of itab. select n n1 from into itab table /zteest. *internal table has n n1 k gar 100 uji hae 90 iou gar 90 uji hae 87 iou I want gar
-
When trying to download an update for PhotoShop Elements help, I get a message "Une erreur s'est produite pendant le téléchargement de la mise à jour. Erreur no 16822." (In English "An error has occurred during download of the update. Error 16822. I