Using the result of a jms webservice

When I have deployed my simple HelloWorld webservice, I obviously want to write
a client. I chose to write a dynamic client, which works fine(almost!). Only one
problem, in the programming guide that comes with weblogic they only mention how
to call system.out.println on the result(see quote below). But that's not what
I want to do, I want to use the result, but how? From what I can see the resulting
object is just a java.lang.Object. How should I cast it, and to what? The soap
xml says:
<part name="result" type="xsd:anyType" />
The question is, what is it that I'm receiving and how can I find that out dynamically.
This is the code I'm using:
SoapMethod method = proxy.getMethod("receive");
SoapType type = method.getReturnType();
System.out.println("type is:" + type.getTypeAsString());
System.out.println("value is:" + type.toString());
System.out.println("class is:" + type.getType().getName());
The output of the system.out's above is:
type is:Object
value is:Object result
class is:java.lang.Object
quote:
Invoke the receive method to receive data from the Web service. In the example,
the client application uses an infinite while loop to continuously invoke the
receive method, in essence polling the JMS destination for messages. When the
receive method returns data, the client application prints the result to the standard
output:
while( true ){
Object result = method.invoke( null );
System.out.println( result );

Thanks manoj, for taking the time to help me with my problem.
I noticed in your examples you posted in your reply that none of the examples
are using queues. Can you confirm that there is a bug when using queues? It gives
NullPointerException in the Servlet and FileNotFoundException on the client when
trying to access the result queue to read the response of my asynchronous webservice.
See the earlier posting, regarding Webservice works with Topics but not with Queues?
Cheers,
Mr Bean
"manoj cheenath" <[email protected]> wrote:
if you are using soap encoding:
you will get back the object you posted to JMS queue. This
can be a primitive type (like java.lang.String) or a java bean (like
com.foo.MyJavaBean)
if you are using literal encoding:
you will get back a org.w3c.dom.Element back.
few message style examples are attached.
regards,
-manoj
"MrBean" <[email protected]> wrote in message
news:[email protected]...
When I have deployed my simple HelloWorld webservice, I obviously wantto
write
a client. I chose to write a dynamic client, which works fine(almost!).Only one
problem, in the programming guide that comes with weblogic they onlymention how
to call system.out.println on the result(see quote below). But that'snot
what
I want to do, I want to use the result, but how? From what I can seethe
resulting
object is just a java.lang.Object. How should I cast it, and to what?The
soap
xml says:
<part name="result" type="xsd:anyType" />
The question is, what is it that I'm receiving and how can I find thatout
dynamically.
This is the code I'm using:
SoapMethod method = proxy.getMethod("receive");
SoapType type = method.getReturnType();
System.out.println("type is:" + type.getTypeAsString());
System.out.println("value is:" + type.toString());
System.out.println("class is:" + type.getType().getName());
The output of the system.out's above is:
type is:Object
value is:Object result
class is:java.lang.Object
quote:
Invoke the receive method to receive data from the Web service. Inthe
example,
the client application uses an infinite while loop to continuouslyinvoke
the
receive method, in essence polling the JMS destination for messages.When
the
receive method returns data, the client application prints the resultto
the standard
output:
while( true ){
Object result = method.invoke( null );
System.out.println( result );
begin 666 allmessage.jar
M4$L#!!0`" `(`!Q<7RL````````````````)``0`345402U)3D8O_LH```,`
M4$L'" `````"`````````%!+`P04``@`" `<7%\K````````````````% ``
M`$U%5$$M24Y&+TU!3DE&15-4+DU&\TW,RTQ++2[1#4LM*L[,S[-2,-0SX.5R
M+DI-+$E-T76J! D8ZQG&&Q@J: 27YBGX9B87Y1=7%I>DYA8K>.8EZVGR<O%R
M`0!02P<(SE1K#D<```!'````4$L#! H``````()T72L````````````````$
M````86YT+U!+`P0*``````!12$0K````````````````"@```&%N="]B=6EL
M9"]02P,$"@``````44A$*P```````````````!,```!A;G0O8G5I;&0O97AA
M;7!L97,O4$L#! H``````%%(1"L````````````````8````86YT+V)U:6QD
M+V5X86UP;&5S+W-O87 O4$L#!!0`" `(`#>&62L````````````````D````
M86YT+V)U:6QD+V5X86UP;&5S+W-O87 O0VQI96YT+F-L87-SA55;4]M&%/X6
M7R2$FA %4QP"I9<$.S82I)=0DZ9M*"2TAM Z#:7I318+%I$EC[0&\]#^I_;!
MM&62R?2Q/ZK3L[X4%)S&,SZ[>_9\9\_EV]7?__SY# G,85]#!@4%10U#**B8
M4V%JL#"O8D'%30WOXCT%[VO04)"+#U3<4K"HX0(^5%$:P1)N*_A(Q1T-!CY6
M\(F*3S7<Q;*"SX:Q@E4%]S1<D;[ORW%-BL\U?(&R@G6&]&W7=\4=AD0N_X@A
MN1SL<(:+9=?G&\UZE8</[:I'FF3==GV&\=SC\KY]8%N>[>]9%1&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DLTH/-2 ;E,O4/4$L'".G,>(S3`@``T@4``%!+`P04
M``@`" `WAEDK````````````````*0```&%N="]B=6EL9"]E>&%M<&QE<R]S
M;V%P+U-E<G9I8V5(;VUE+F-L87-S;8X];L) $(7?\.,-A 32A98J%&0/D"Z(
M"! 2$IQ@64TB6[;76CO(9TO!`3@48@PH4%!,\;WYYFGVA[\=ZABAI_"HT%%X
M(@36LRF8,'@;+K@T219SKG-G,KUFOPTMS]*"_;>Q_$%H3TK+61&Z-%=X5NA*
MM':_WO)7&$M)[W(S=0F_1V9K"/V[I94@>J7HV*0_>KF)V!:$ERHJ-4<;/9E_
MGK7^-1N?OOW_@O!ZJO!)J%><N)M50"#49.H`J$%HH"D4" 62*SP(M81J:!\!
M4$L'".(!=>+,````&@$``%!+`P04``@`" `WAEDK````````````````+@``
M`&%N="]B=6EL9"]E>&%M<&QE<R]S;V%P+U-E<G9I8V5);G1E<F9A8V4N8VQA
M<W-ECMU*PT 0A<\T:=?6OZH(7GDIR87N`W@G-)!2$,P3;)>Q;DBR(8DES^:%
M#^!#B1/%'^K%,',^YLR<M_>75P2XQJG"D<*QPIPP8_ODLZYQU89P%:URLS6Z
M,-5&?\';^#\2UZ*W7'?.5ZW""4$-5]*J(X11&J>$Z0"2PAM!XRA-XD1,F7]N
M+">N8,)YQLW66183-X_&\LWPAG#)O2GK@EO=>E/KW2W"_#?._3IG*P_.!M1K
MSM=ZL;S[IA>?BTWI] .7ON.?R!,"8205``A"R8RQJ(FH4+H2LH?I#IEA_R^1
M.I!YA,,/4$L'" `AY6?E````5@$``%!+`P0*``````"*94DK````````````
M````$P```&%N="]B=6EL9"]-151!+4E.1B]02P,$% `(``@`-H99*P``````
M`````````!X```!A;G0O8G5I;&0O345402U)3D8O96IB+6IA<BYX;6R-4LMN
MPC 0O%?J/[A<(E5-MNFQ<H/$0RI5'PBHJIZ0DRS"B-BIO2#X^SH0#!20>LO.
MS.Z.9\.;JV+.EFBLU.JI$4?WC69R?<5O.A_MT7>_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+#)XC\-A:!&DN*AYD@2\JJNDDK^%!::R_[LR2IK'J/8!'6_@2=$
MV_V!,'>Y&&A!?9B@.?O9[WY_@@V1WLF\4+I@$P?D&XB?J:R.^K^8$E%U&3MU
M*$+L\+3'/9Q>W0?!WM5_EN3=*8!%H$B]20<HF*9PO9Q"QO+C#2L^KEH&4?E)
M2P))]<X)A3:1,'E=;H!;/?;KPOD;7[NCF1$(B(FGSI4;6[&@CA]2[@^@-TP\
MV-T$BIT5?L^77B(VP"L766X_=!(\Z*9&2*\E"MU1227D6OK9.?/9J21-I I(
M+U?X44 3[%XHQ6/ =?1[K2@2+1K3R\B?L9!'[_SE6%@2"6 C6V6._A5NYV+%
MWL/E18*$FM I%'_9<G(#) A5`KY [N.5Y885#*]:@N&_5OZY+4G2" S"ED-'
M<7AZJL6<?I.9():1=4=HAR/:#>P3J!(>3 '35G34V"EABRH+&72@8W@XY(I(
M7[X7<@I)S4[%&VB]0Q#!\I&%EIA%Y!I'5NK-Y(JE3G]+4UMO7X]\2VL7MJ5\
M7'0E&'G.LR8KA E?[S.%&W4=.V+.):>3:HC;PGG=.4)4#4Q>4+(K[DR3??BN
MD2=,N3H&V=B(S]?Y1E\&(.D3XTUJ@+L<MQ9PJ'6YAMVC?'EN2E&'"V$)]8P8
MA2/(&C8\V:SGP9?<#IM-X\P:*KQFFM 8$G.C&3C&GB40V)TZ/G?$D<C#SD/J
M>YZ_8%6I%:6FUN;O=";+.U5)5COQX3&V?M"JJA:W)2MK;#<YJG\G!DV0'V]R
M,^<VC-WD!<3D2G%;GE+$&>SJ(^D<89^P7.N <9V&Y%"=TLYM<OLCK?RI:JT+
M2-7_FQE^W()5^<;8M#(=-->Z$&K2;(%CIOO0-P/N0+Q[GHP#G(E!9GP"R#%/
M.BW7"8[5YTB=S&5>

Similar Messages

  • Dialog prompt and check if file exists, and use the result of dialog

    I have this working script and I want to change the way it behaves.
    I want a dialog to come up, Do you want to skip or replace existing files.
    Then the result  of the dialog to be used in the reast of the script.
    I've added it in the script where I need to use it. in noce big letters, hopefully its not a big job.
    Many thanks
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
              property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --Setup list of folders and process details of folders
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    set tc to (count dtF)
    repeat with i from 1 to tc
              set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
              if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not start with "Sue" and folderName does not start with "Design" then
                        set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                        set FolderEndName to last text item of folderName
                        set brandName to first text item of folderName
                        set my text item delimiters to "_PSD"
                        set weekNumber to first text item of FolderEndName
                        set my text item delimiters to oldTID
                        set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
      --set up names to destination folders and create locally based on brand name and week number
                        set this_local_folder to "Images:2012-2013"
                        set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                        set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                        set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                        set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                        set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                        set this_Network_folder to "GEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
                        set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                        set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                        set website_images to "GEN:Website_Images:"
      --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                        set this_ftp_folder to "pulse:"
                        set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                        set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                        set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                        set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
      --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
      --use the result for the if file exists?
                        display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
      --taking the folder identify which process it must follow.
                        if brandName is equal to "BH" then
                                  try
                                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                                  on error
                                            set o's theseNames to {} -- no psd files or "8BPS"
                                  end try
                                  set numOfNames to (count o's theseNames)
                                  repeat with j from 1 to numOfNames
                                            set thefile to theFolder & ":" & (item j of o's theseNames)
      --    B H   Folder Photoshop Process
      --if thefile exists in the folder localBrandFolder_PSD then do the result of dialog.
      --"Skip" the file and move on to next
      --If "replace" continue the rest of the script.
                                            tell application "Adobe Photoshop CS5.1"
      -- I remove the command activate, Photoshop stay in background
                                                      set ruler units of settings to pixel units
                                                      try
      open (alias thefile) showing dialogs never
                                                                set origName to name of current document
                                                                set myOptions to {class:JPEG save options, quality:12}
                                                                set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                                tell current document
      --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                          if (quick mask mode) then delete channel ¬
                                                                                    "Quick Mask"
      --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                          if (exists layer "Original Layer") then ¬
                                                                                    tell layer "Original Layer" to set name to "Original Image"
      save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                                          (delete layer "Original Image") flatten
      resize image resolution 300 resample method none
      --sharpen image
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
      --get file path, return path of the JPEG file, work with (without copying)
      -- (with copying) : it return path of PSD file
                                                                          set newFile to file path --( return path of type alias )
      -- duplicate file using the Finder  -->on duplicateFile(..)
                                                                          my duplicateFile(newFile, {ftpBrandFolder_High_Res})
      --Prepare for Low RES by resetting image history
                                                                          set current history state to history state 3
                                                                          flatten
                                                                          resize image width 1348
      resize image resolution 300 resample method none
      filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
      --add save to lowResFolder with same options
      save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                                          set newFile to file path
                                                                          set newFile2 to newFile as string -- for testing end of name
                                                                          if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                                                    my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                                                          else
                                                                                    my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                                                          end if
      close saving no
                                                                end tell
                                                      on error
                                                                set noError to false
                                                                my myLogs(thefile) -- write path to log file in Desktop
                                                                try
      close saving no --if exists, close current document
                                                                end try
                                                      end try
                                            end tell
                                  end repeat
      --End BH
    -- else if and the rest of the script.....
    end repeat
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
              try
                        do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
              end try
    end myLogs
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
              tell application "Finder" to repeat with folderPath in foldersPath
                        with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
      duplicate tFile to folder folderPath with replacing
                        end timeout
              end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
              tell application "Finder" to tell folder folderPath
                        if not (exists folder tName) then
                                  return (make new folder at it with properties {name:tName}) as string
                        else
                                  return (folder tName) as string
                        end if
              end tell
    end getFolderPath
    tell application "Finder"
              open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
    end tell

    Hi,
    I think that's what you want.
    I put the dialog in the beginning, so it does not appear to each folder, otherwise put it in the loop as it was originally.
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
          property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
    --use the result for the if file exists?
    display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
    set skipFiles to (button returned of the result) is "Skip (Faster)"
    --Setup list of folders and process details of folders
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    set tc to (count dtF)
    repeat with i from 1 to tc
          set folderName to item i of dtF --<:  is the folder name, no need to use text item delimiters -->":"
          if folderName does not start with "2_" and folderName does not start with "Hot" and folderName does not start with "Press" and folderName does not start with "Design" and folderName does not start with "Keywords" and folderName does not start with "Season" and folderName does not start with "Sue" and folderName does not start with "Design" then
                set {oldTID, my text item delimiters} to {my text item delimiters, "_WK"}
                set FolderEndName to last text item of folderName
                set brandName to first text item of folderName
                set my text item delimiters to "_PSD"
                set weekNumber to first text item of FolderEndName
                set my text item delimiters to oldTID
                set theFolder to ("Hal 9000:Users:matthew:Desktop:" & folderName)
                --set up names to destination folders and create locally based on brand name and week number
                set this_local_folder to "Images:2012-2013"
                set localWeekFolder to my getFolderPath("WK" & weekNumber, this_local_folder)
                set localBrandFolder to my getFolderPath(brandName, localWeekFolder)
                set localBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", localBrandFolder)
                set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
                set localBrandFolder_PSD to my getFolderPath(brandName & "_WK" & weekNumber & "_PSD", localBrandFolder)
                set this_Network_folder to "GEN:Brands:Zoom:Brand - Zoom:Upload Photos:2013:"
                set networkWeekFolder to my getFolderPath("Week" & weekNumber, this_Network_folder)
                set networkBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", networkWeekFolder)
                set website_images to "GEN:Website_Images:"
                --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                set this_ftp_folder to "pulse:"
                set ftpWeekFolder to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                set ftpBrandFolder to my getFolderPath(brandName, ftpWeekFolder)
                set ftpBrandFolder_Low_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", ftpBrandFolder)
                set ftpBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", ftpBrandFolder)
                --taking the folder identify which process it must follow.
                if brandName is equal to "BH" then
                      try
                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                      on error
                            set o's theseNames to {} -- no psd files or "8BPS"
                      end try
                      set numOfNames to (count o's theseNames)
                      repeat with j from 1 to numOfNames
                            set thefile to theFolder & ":" & (item j of o's theseNames)
                            --    B H   Folder Photoshop Process
                            tell application "Finder" to set b to exists file (localBrandFolder_PSD & item j of o's theseNames)
                            if b and not skipFiles then -- file exists and "replace" (continue the rest of the script).
                                  tell application "Adobe Photoshop CS5.1"
                                        -- I remove the command activate, Photoshop stay in background
                                        set ruler units of settings to pixel units
                                        try
                                              open (alias thefile) showing dialogs never
                                              set origName to name of current document
                                              set myOptions to {class:JPEG save options, quality:12}
                                              set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                              tell current document
                                                    --If the quick mask mode has been left on then delete the channel Quick Mask
                                                    if (quick mask mode) then delete channel ¬
                                                          "Quick Mask"
                                                    --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                    if (exists layer "Original Layer") then ¬
                                                          tell layer "Original Layer" to set name to "Original Image"
                                                    save in (localBrandFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                    (delete layer "Original Image") flatten
                                                    resize image resolution 300 resample method none
                                                    --sharpen image
                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                    save in (localBrandFolder_High_Res & name) as JPEG with options myOptions without copying
                                                    --get file path, return path of the JPEG file, work with (without copying)
                                                    -- (with copying) : it return path of PSD file
                                                    set newFile to file path --( return path of type alias )
                                                    -- duplicate file using the Finder  -->on duplicateFile(..)
                                                    my duplicateFile(newFile, {ftpBrandFolder_High_Res})
                                                    --Prepare for Low RES by resetting image history
                                                    set current history state to history state 3
                                                    flatten
                                                    resize image width 1348
                                                    resize image resolution 300 resample method none
                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                    --add save to lowResFolder with same options
                                                    save in (localBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                    set newFile to file path
                                                    set newFile2 to newFile as string -- for testing end of name
                                                    if newFile2 ends with "_2.jpg" or newFile2 ends with "_3.jpg" then -- exclude website_images
                                                          my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res})
                                                    else
                                                          my duplicateFile(newFile, {networkBrandFolder_Low_Res, ftpBrandFolder_Low_Res, website_images})
                                                    end if
                                                    close saving no
                                              end tell
                                        on error
                                              set noError to false
                                              my myLogs(thefile) -- write path to log file in Desktop
                                              try
                                                    close saving no --if exists, close current document
                                              end try
                                        end try
                                  end tell
                            end if -- else "Skip" the file and move on to next
                      end repeat
                      --End BH
                end if
          end if
    end repeat
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
          try
                do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
          end try
    end myLogs
    on duplicateFile(tFile, foldersPath) -- tFile is an alias, foldersPath is a list of folder
          tell application "Finder" to repeat with folderPath in foldersPath
                with timeout of 200 seconds -- adjust it,  error if the copy  is longer that 200 seconds
                      duplicate tFile to folder folderPath with replacing
                end timeout
          end repeat
    end duplicateFile
    on getFolderPath(tName, folderPath)
          tell application "Finder" to tell folder folderPath
                if not (exists folder tName) then
                      return (make new folder at it with properties {name:tName}) as string
                else
                      return (folder tName) as string
                end if
          end tell
    end getFolderPath
    tell application "Finder"
          open "Hal 9000:Users:matthew:Desktop:LogPhotoshopError.txt"
    end tell

  • How can i plot a histogram with using the results of Line Length

    PLS HELP.How can i prepare a histogram with using the results of line length code(It is somewhere in the middle).
    This is a final exam take-home question. I would appreciate if you can help?
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import java.text.*;
    import java.io.File;
    public class WordAnalyser extends JFrame implements ActionListener
    private JMenuItem jmiAc, jmiSil, jmiCikis, jmiAnaliz, jmiHakkinda, jmiKullanim;
    private JTextArea jta1, jta2;
    private JFileChooser jFileChooser = new JFileChooser();
    File hafizada;
    File aktarilan = new File("Sonuc.txt");
    // Main method
    public static void main(String[] args)
    WordAnalyser frame = new WordAnalyser(); /* Ana ekran olusturulur */
    frame.setSize(400, 300); /* Degerleri belirlenir */
    frame.setVisible(true); /* Gorunebilirligi ayarlanir */
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    public WordAnalyser()
    setTitle("Serkan Ozgen Dosya Inceleme Programina Hos Geldiniz");
    JMenuBar mb = new JMenuBar();
    setJMenuBar(mb);
    JMenu fileMenu = new JMenu("Dosya");
    fileMenu.setMnemonic('F');
    mb.add(fileMenu);
    JMenu helpMenu = new JMenu("Degerlendirme");
    helpMenu.setMnemonic('H');
    mb.add(helpMenu);
    JMenu kullanimMenu = new JMenu("Kullanim Kilavuzu");
    mb.add(kullanimMenu);     
    fileMenu.add(jmiAc = new JMenuItem("Ac", 'A'));
    fileMenu.add(jmiSil = new JMenuItem("Sil", 'S'));
    fileMenu.add(jmiCikis = new JMenuItem("Cikis", 'C'));
    helpMenu.add(jmiAnaliz = new JMenuItem("Analiz", 'D'));
    helpMenu.add(jmiHakkinda = new JMenuItem("Hakkinda", 'H'));
    kullanimMenu.add(jmiKullanim = new JMenuItem("Kullanim"));     
    getContentPane().add(new JScrollPane(jta1 = new JTextArea()), BorderLayout.CENTER);
    getContentPane().add(jta2 = new JTextArea(), BorderLayout.SOUTH);
    jmiAc.addActionListener(this);
    jmiSil.addActionListener(this);
    jmiCikis.addActionListener(this);
    jmiAnaliz.addActionListener(this);
    jmiHakkinda.addActionListener(this);
    jmiKullanim.addActionListener(this);
    public void actionPerformed(ActionEvent e)
    String actionCommand = e.getActionCommand();
    if (e.getSource() instanceof JMenuItem)
    if ("Ac".equals(actionCommand))
    Ac();
    else if ("Sil".equals(actionCommand))
    Sil();
    else if ("Cikis".equals(actionCommand))
    System.exit(0);
    else if ("Analiz".equals(actionCommand))
    sayim();
    else if ("Hakkinda".equals(actionCommand))
    JOptionPane.showMessageDialog(this,
    "!!!! Bu program text analizi gerceklestirir. Her hakki saklidir SERKAN OZGEN!!!!",
    "Bu program hakkinda",
    JOptionPane.INFORMATION_MESSAGE);
    else if ("Kullanim".equals(actionCommand))
         JOptionPane.showMessageDialog(this,
         " Ilk once dosya menusunden Ac i tiklayarak analiz etmek istediginiz Dosyayi seciniz (Lutfen uzantisi *.txt \nveya *.log olsun). Daha sonra Degerlendirme menusunden analizi tiklarsaniz dosyanizda kac adet rakam, harf, \ncumle ve kelime oldugunu gorebilirsiniz. Simdiden kolay gelsin",
         "Programin kullanim detaylari",
         JOptionPane.INFORMATION_MESSAGE);
    private void Ac()
    if (jFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
    hafizada = jFileChooser.getSelectedFile();
    Ac(hafizada);
    // Acilan Dosyayi ana ekranda gostermeye yariyan bir method
    private void Ac(File file)
    try
    // Acilan dosyayi okuma ve ana ekranda gosterme
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
    byte[] b = new byte[in.available()];
    in.read(b, 0, b.length);
    jta1.append(new String(b, 0, b.length));
    in.close();
    catch (IOException ex)
    // Temizle tusunun hangi ekranlara etki edecegini secme
    private void Sil()
    jta1.setText("");
    jta2.setText("");
    private void sayim()
    int buff;
    int sayac = 0;
    int Cumleler = 0;
    int Kelimeler = 0;
    int Karakterler = 0;
    int Satirlar = 0;
    int Rakamlar = 0;     
    boolean start = true;
    int linenum = 0;     
    try
    FileInputStream instream = new FileInputStream(hafizada);
    FileOutputStream outstream = new FileOutputStream(aktarilan);
         BufferedReader infile = new BufferedReader(new InputStreamReader(new FileInputStream(hafizada)));
    PrintStream out = new PrintStream(outstream);
         out.println("---Kelime Avcisinin Sonuclari---");
         String line = infile.readLine();
         while (line != null){
         int len = line.length();
         linenum++;
         line = infile.readLine();
         out.println("Line Length :"     + linenum + "\t" +len);
    while ((buff=instream.read()) != -1)
    switch((char)buff)
    case '?': case '.': case '!': /* Eger "?", "." veya "!" gorurse program cumleleri ve kelimeleri arttirir*/
    if (start == false)
    Cumleler++;
    Kelimeler++;
    start = true;
    break;
    case ' ': case '\t': case ',': case ';': case ':': case'\"': case'\'': /* Eger /t,;:\ ve \" bu isarteleri goruruse program kelimeleri arttirir */
    if (start == false)
    Kelimeler++;
    start = true;
    break;
              case 'n': case '\n': /* Eger \n gorurse satirlari arttirir */
              if (start == false)
                   Satirlar++;
                   Kelimeler++;
                   start = true;
              break;
    default:
    if (((char)buff >= 'a' && (char)buff<='z')|| /*a-z, A-Z veya - degerlerini gorurse karakterler arttirilir */
    ((char)buff >= 'A' && (char)buff<='Z')||
    ((char)buff == '-'))
    Karakterler++;
    if ((Kelimeler % 50) == 49)
    if (start == true)
                   out.println();     
    out.print((Kelimeler+1) + " ");
    out.print((char)buff);
    start = false;
              if ((char)buff >='0' && (char)buff <='9') {  /* 0-9 gorurse rakamlari arttiri */
                   Rakamlar++; }
    }// switch
         }//while
    instream.close();
    out.println();
    out.println();
    out.println("Karakter sayisi: " + Karakterler);
         out.println("Kelime sayisi: " + Kelimeler);
    out.println("Cumle sayisi: " + Cumleler);
         out.println("Satir sayisi: "+ Satirlar);
         out.println("Rakam sayisi: "+ Rakamlar);
    outstream.close();
    try
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(aktarilan));
    byte[] b = new byte[in.available()];
    in.read(b, 0, b.length);
    jta2.append(new String(b, 0, b.length));
    in.close();
    catch (IOException ex)
    catch (Exception e)
    System.out.println(e);
    }

    Why is it that you're not interested in IOExceptions?
    catch (IOException ex)
    } Empty catch blocks is a hallmark of foolish Java code. At least print out the stack trace.
    %

  • Using the result of a subselect in another part of the select

    Does anyone know if 9i can use the results of a subselect in a select in another part of the select. For example:
    select x, (select y from sometable) as ssvar, z, (select abc from someothertable where somecolumn=ssvar) from yetanothertable
    Anyone? We have a bunch of Sybase queries we are porting over and they use this extensively. It looks like the 9i docs say this may not be possible, but I really wanted to be sure before I rewrite the queries.
    -Lou

    From your example, an inline view seems most appropriate to me...
    select max_table.table_name, column_name
    from user_tab_columns, (
    select max(table_name) as table_name
    from user_tables) max_table
    where max_table.table_name = user_tab_columns.table_name
    However, if your actual usage is more complicated, you might want to look at 'subquery factoring' (new in 9i). It doesn't really do much good for this example but here's the syntax...
    with max_table as (
    select max(table_name) as table_name
    from user_tables)
    select max_table.table_name, column_name
    from max_table, user_tab_columns
    where user_tab_columns.table_name = max_table.table_name
    Richard

  • Can I use the result of a query in another query of the same cube?

    Hello everybody;
    I have the following case. In query "A", I have used in rows a structure, whit a last formula named “Total A”, in another query "B", I need to used the result of “Total A”.
    Can anybody help me?
    Thanks in advanced.
    Mariana Serrano

    Hi Mariana,
    You can change local structures into reusable structures in any existing query by selecting the structure and, choosing Save as... from the context menu and then entering a technical name and a description in the Save Structure as... dialog box.
    You can change reusable structures that you are using in a query into local structures by selecting the structure and choosing Remove Reference from the context menu.
    Also go through this link:
    http://help.sap.com/saphelp_sem40bw/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Best Regards,
    DMK
    *Assign point if it helps...

  • Using the result of a function, inside a subselect

    Hi!
    I´m wondering if it´s possible to use the result of a function inside a subselect. Let me give you an example of what I´m trying to do here:
    select * from t_node where node_pk in (get_node_parents_pk(22345));
    The function get_node_parents_pk stands in for the following SELECT-statment:
    select node_pk from t_node_child where parent_node_pk = 12345
    The statement above would return something like this: 12435,23423,23453,23452
    These values represent the node_pk value for the parent nodes.
    I want the get_node_parents_pk function to return a result set similar to this so that I might call it inside the IN ( ) statement.
    Any clue? =)

    I created a collection type in the database:
    CREATE OR REPLACE TYPE nodes_pk_arr IS TABLE OF INTEGER;
    The function get_node_parents_pk () is made to return the collection type above. However, this does not work. I get the following error message:
    SELECT *
    FROM t_node
    WHERE node_pk IN
    (SELECT * FROM TABLE (get_node_parents_pk (22345)));
    ORA-22905: cannot access rows from a non-nested table item
    However, if I insert a nodes_pk_arr collection directly into the SQL-statement, like I do below, it works:
    SELECT *
    FROM t_node
    WHERE node_pk IN
    (SELECT * FROM TABLE (nodes_pk_arr(24564,23545,34523));
    So, when returning the collection from the function I´m told that the collection is not a nested table, when in fact it is. What gives?
    Also, is there no way to return a result set directly from the get_node_parents_pk() function, making it possible to write the statement like that shown below?
    SELECT *
    FROM t_node
    WHERE node_pk IN (get_node_parents_pk (22345));
    Your reply is much appreciated!
    Kind regards
    Robert

  • Using the result of 1st report to 2 nd report

    Hi,
    I have created one report with 5 Dataproviders.
    I want to create another report by using the result of 2nd dataprovider of thr 1st report.
    Is it possible in BO XI R2 Desktop intelligence?
    Thanks,
    Indu

    Hi Indu,
    If I understand you correctly, you want to create the query once but run mulitple reports of it. Is it okay if the reports are in tabs within the same document or do they have to be in separate documents?
    If the later it is not really possible. There are a few options
    It is possible to use a query create in QaaWS, but there is no schedule option around this, so every call is on demand.
    Also you can create instances of reports using Web Intelligence/Crystal Reports and have more that one Live Office document/Xcelsius dashboard point to the instance. In this event you are runnig the query once and using the displaying it in different reports.
    Finally, if you just want to reuse a query from one report to another then you can copy and paste the report and change the report layout.
    Hope this helps
    Alan

  • Performing calculations on characteristics, using the results as query rows

    I want to perform a calculation on 2 date fields (find the number of years separating the dates). These 2 date fields are characteristics. I want to use the result field as a row in the query. How to do this?
    Do I have to use a calculated key figure and then converted that key figure into a characteristic to use in a row?
    Thanks
    Sanjeev

    Hi,
    You need to use the Condition on this Date difference column.
    http://help.sap.com/saphelp_bw31/helpdata/en/73/702e39074dc93de10000000a114084/frameset.htm
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by:
            Anil Kumar Sharma

  • Is there a way to filter a drop down list by using the result main data display from"GetUserProfileByName" when open the form.

    Hi 
    Is there a way to filter a drop down list by using the result main data display from"GetUserProfileByName" when open the form?
    The second source has a huge list of company names that can be narrrow by email work. 
    background:SP 2010 and Infopath 2010
    CRISTINA&amp MICROSOFT Forum

    I'm not sure if I understood your question clearly but here is a good resource on how to get attributes from "GetUserProfileByName" web services:
    http://blog.mangroveweb.com/pre-populating-an-infopath-from-with-mysql-data-using-a-net-web-service/using-sharepoints-getuserprofilebyname-web-service-to-retrieve-ad-account-information/
    Regarding filtering dropdown list then this could be done by applying form on-load rules. 
    Hope this helps

  • Use the results of an SQL query to create another query

    I am working on a bidding/allocation system using C# and MySQL, and I am currently having difficulty implementing the “post-allocation” mechanics of the system. Let me explain how it works, before introducing the code:
    When the bids are made on the system, they all have the position 0, so the first thing the system does is order them according to priority.
     (bid table)
    In this case, 5 bidders are interested in what is in plot 15, but we have not assigned them a position yet.
     (bid table)
    The system then organises the bids according to the order in which they are going to processed.
    The bids are then allocated, but unfortunately there are only 3 spaces in plot 15 that can be allocated. As a result, we use the priority listing to determine which bidder gets what.
     (booking table)
    At this stage, I can say that I am stuck, there are two things that I want to do, both of which involve reusing the results of the query at step 2.
     (bid table)
    The bidders that have their job allocated should see: their bid.status updated
    from Queued to Allocated,
    the bid.position should
    be set to 0,
    and their job_id should
    be set to the booking they have been allocated (i.e. booking.id).
    The bidders that have not had their jobs allocated should see: their bid.status remain
    as Queued, and their bid.position should
    be set to 0 in
    preparation for the method to run again
    The difficulty I am having is in stage 3, how do I determine which jobs have been allocated and which ones have not, and then run the necessary SQL queries in order to make the updates?
    My code so far is as follows:
    // STEP 1a - SELECT BIDS
    string query =
    "SELECT t1.operator_id, t1.datetime, t1.plot_id, t1.position, t2.market_access FROM bid t1 " +
    "JOIN operator t2 ON t1.operator_id = t2.id WHERE t1.status='Queued' AND t1.postcode=@postcode " +
    "ORDER BY t2.market_access ASC, t1.datetime ASC";
    var bidList = new List<BidList>();
    var cmd = new MySqlCommand(query, _connection);
    cmd.Parameters.AddWithValue(("@postcode"), _plot);
    MySqlDataReader dataReader = cmd.ExecuteReader();
    while (dataReader.Read())
    var item = new BidList
    OperatorId = dataReader["operator_id"] + "",
    PlotId = dataReader["plot_id"] + "",
    Position = dataReader["position"] + "",
    Datetime = dataReader["datetime"] + "",
    MarketAccess = dataReader["market_access"] + "",
    bidList.Add(item);
    dataReader.Close();
    // STEP 1b - SET PRIORITIES
    for (var i = 0; i < bidList.Count; i++)
    var position = i + 1;
    bidList[i].Position = position.ToString();
    query = "UPDATE bid SET position=@position WHERE status='Queued' AND postcode=@postcode AND operator_id=@operator_id;";
    cmd = new MySqlCommand(query, _connection);
    cmd.Parameters.AddWithValue(("@position"), position);
    cmd.Parameters.AddWithValue(("@postcode"), _plot);
    cmd.Parameters.AddWithValue(("@operator_id"), bidList[i].OperatorId);
    cmd.ExecuteNonQuery();
    dataReader.Close();
    // STEP 2 - ALLOCATE JOBS ACCORDING TO PRIORITY
    foreach (var t in bidList)
    query = "SELECT operator_id, plot_id, status FROM booking " +
    "WHERE status='open' AND postcode=@postcode AND operator_id='0'" +
    "ORDER BY datetime ASC;" +
    "UPDATE booking SET operator_id=@operator_id, status='Allocated' " +
    "WHERE (plot_id=@plot_id AND operator_id='0' AND status='Open') LIMIT 1;";
    cmd = new MySqlCommand(query, _connection);
    cmd.Parameters.AddWithValue(("@operator_id"), t.OperatorId);
    cmd.Parameters.AddWithValue(("@postcode"), _plot);
    cmd.Parameters.AddWithValue(("@plot_id"), t.PlotId);
    cmd.ExecuteNonQuery();
    dataReader.Close();
    // STEP 3
    CloseConnection();

    I can't tell.  When modifying row(s) you have to be able to uniquely be able to identify the row(s) in the database you want to modify.  That is why I recommended the other day to use DataAdapter instead of the DataReader.  You can with the
    reader, but you need to unique identify the rows.
    I can't tell from the limited amount of data you posted if in table 2 that there is only one row with the same operator id and plot id.  It looks like in table 2 the 'id' number is unique.  When working with a database with multiple tables you
    need to be able to link tables together with primary keys (columns wit unique values).  If the database isn't designed properly then it is impossible to do some operations.  So you always have to make sure you design a database properly.
    jdweng
    When you say table 2 are you referring to the bid or booking table?
    Here is the table structure for the bid table
    Here is the table structure for the booking table
    Hope it helps makes things clearer!

  • Applescript - how do I use the result of a library return value

    Hello.  Been using applescript for about a week.  Very new.
    I'm using the following script below using an external libarary to query mysql database on external server.  works.  gives results.  How do I save them to do something with the. 
    when I run it, the results of the call to the library show up in the results window.  that makes sense.
    ie
    {rows:1, cols:1, record_data:{{"85016   "}}}
    I want to assign the results to a variable to use it later, particularly the 85016.
    I try "set testVariable to tell db_link to do_select(theDBCommand)"
    no good.  Not sure how to do this.
    Help appreciated.
    Script follows:
    -- links to the mysql tools - thanks to http://www.j-schell.de/node/80
    set library_path to "js_aux_scripts:mysql_objects.scptd"
    set app_support to (path to application support folder) as string
    set DB_Library to (load script file (app_support & library_path))
    set db_link to new_link("lala.yadayada.com", "user", "pass", "db") of DB_Library
    -- collect the job number you want to run
    -- Get the Number
    set displayString to "Enter Job Number"
    set the theIcon to 1
    set theJobNumber to ""
    repeat
      display dialog displayString default answer theJobNumber with icon theIcon
              set theJobNumber to text returned of result
              try
                        if theJobNumber = "" then error
                        set theJobNumber to theJobNumber as number
                        exit repeat
              on error
                        set displayString to "INVALID ENTRY! " & displayString
                        set theIcon to 0
              end try
    end repeat
    -- Query the database and get the other informtion from the ticket file.
    set theDBCommand to "SELECT BaseId from SfComp where JobNo = " & theJobNumber
    tell db_link to do_select(theDBCommand)

    Usually you would assign the variable to the results of the command/function, which are inside the tell statement -for example:
    tell db_link to set testVariable to do_select(theDBCommand)
    The results are a record, where it looks like record_data is a list of lists (although your example only has one item), so for that you can specify the particular property you are intereste in, for example:
    get first item of first item of record_data of testVariable

  • How to use the result of a sql query for a max () function

    Hi
    I wrote a query on which i wrote
    "select max(id) from users "
    how can i use the returned value.
    if i made the var name ="userid"
    can it be userid.rows[0] or what.
    thnx for any help

    Hi!
    The result of this query will be the max ID of users' IDs.
    Let say we have:
    String sql="select max(users.id) from users";
    Statement st = ctx.conn.createStatement();
    ResultSet rs = st.executeQuery(sql);
    rs.next();     
    So you can get the max Id in the following way:     
    int maxId=rs.getInt("id");
    Regards,
    Rossi

  • Using the results of one recordset to filter another.

    Hi
    I have a dynamically generated web page that uses a recordset to gather most of the relevant information that is needed on it. However, what i need to do is create a second record set on the same page and filter that second recordset using one of the results generated from the first recordset. The problem that i am having is that the first recordset displays its information as an echo <?php echo $row_Recordset1['move_type']; ?> but i obviously cannot use this echo code in the filter for the second recordset, the code obviously needs tweaking but i am not sure how.
    If it were as simple as copy and paste the query i would need for the recordset2 is as follows but i am unsure how to code the echo from the first recordset. I am well aware that the following code could never work but i hope it works as simplified example of my intention.
    SELECT ID, move_name, catagory_link_path, move_type, mem_on_off
    FROM moves
    WHERE move_type = <?php echo $row_Recordset1['move_type']; ?>
    ORDER BY move_name ASC
    Any help would be appreciated

    I can think of two ways this can be done. One way, (which may or may not be appropriate in your case) is to use an INNER JOIN. Here is an example:
    $presenterset1=mysql_query("SELECT * FROM presenters INNER JOIN presenters_course USING (presenter_id) WHERE course_id='$course_id' ORDER BY presenter_rank");
    Do a search for tutorials on INNER JOIN for information about how to use it.
    Another possible solution is to nest one SQL statement within the result of another: like this:
    $sql1=mysql_query("SELECT one, two, three from table1 WHERE one='$one'");
    while ($result1=mysql_fetch_assoc($sql1)){
    extract ($result1);
    $sql2=mysql_query("SELECT apple, orange, pear from table2 WHERE fruit='$three'");
    while ($result2=mysql_fetch_assoc($sql2)){
    extract ($result2);
    echo "$apple and $orange" and $pear<br/>";

  • Using the result of Get-ADOrganizationalUnit into an array.

    Hello all!
    I'm hoping you can help me with the following challange. What I want to accomplish:
    I'm building a PowerShell script that will parse all the servernames from multiple OU's through the RDCman Set-Rdg script build by timdun @
    http://blogs.msdn.com/b/timid/archive/2013/03/25/rdcman-config-files-rdg.aspx. I'm doing this on a OU basis because this will give an better overview (treeview) in RDCman.
    So far I can accomplish this by naming each OU individually (see: $ouA, $ouB, etc). See the following script:
    $domain = "dc=domain,dc=subdomain,dc=address,dc=com"
    $ou1 = "FABRIC"
    $ou2 = "Servers"
    $outputfile = "c:\temp\hostnames.txt"
    Import-Module ActiveDirectory
    $ints = @($ouA, $ouB, $ouC, $ouD, $ouE, $ouF, $ouG, $ouH, $ouI, $ouJ, $ouK, $ouL, $ouM, $ouN, $ouO, $ouP, $ouQ, $ouR, $ouS)
    foreach ($i in $ints){
    $servername = Get-ADComputer -SearchBase "OU=$i,OU=$ou2,OU=$ou1,$domain" -Filter '*' | Select -Expand DNShostname
    $servername > $outputfile
    Get-content $outputfile | c:\temp\Set-Rdg.ps1 -Pattern '(..)' -Taxonomy $domain, $ou1, $i -nobackup
    To the question: I'd like to automate this process. I used the command Get-ADOrganizationalUnit command to give me a list of sub OU's.
    $oucollection = Get-ADOrganizationalUnit -LDAPFilter '(name=*)' -SearchBase "OU=$ou2,OU=$ou1,$domain" -SearchScope OneLevel | FT Name
    The result is als follows:
    Name
    OU1
    OU2
    OU3
    OU4
    etc
    My question is: how to rebuild the result from above so that I can use this in $ints (see script) so that i don't have to name each OU individually...
    Many thanks in advance!

    Hi j-tt,
    this should certainly work. However ... if instead of Name you select the distinguishedName, you could use the whole dn as searchbase, instead of the construct you are currently using. Here's an Example after some slight rewrite:
    # Import the Active Directory Modules
    Import-Module ActiveDirectory
    # Grab all sub-OUs of the Search-Base, then retrieve their DistinguishedNames and Names
    Get-ADOrganizationalUnit -Filter "*" -SearchBase "OU=Servers,OU=FABRIC,dc=domain,dc=subdomain,dc=address,dc=com" -SearchScope OneLeve | Select Name, DistinguishedName | ForEach{
    # Save OU into Variable
    $OU = $_.Name
    # For each OU found, get all contained computers, extract their DNSHostnames and pass those into the script
    Get-ADComputer -SearchBase $_.DistinguishedName -Filter "*" | Select -ExpandProperty DNSHostname | c:\temp\Set-Rdg.ps1 -Pattern '(..)' -Taxonomy "dc=domain,dc=subdomain,dc=address,dc=com", "FABRIC", $OU -nobackup
    I'll admit I might have gone a bit wild with the pipelines here :)
    Cheers,
    Fred
    Edit: Fixed my shortened Version to include the Taxonomy parameters
    There's no place like 127.0.0.1

  • Using the results of one Query in a workbook as a filter in another query

    Hello!
    I'd like to have one workbook which my users can execute and the result from one Query (e,g, Customer Account Number) will then be used as a filter in a second query (which would be from a different cube).
    Can this be done?
    Cheers.

    Hi,
    As far as I understand your requirement, you want to pass the result of one query to another query as a filter.
    Well you can do this, by Using Replacement Path Variable.
    For e.g. you want to pass Values of Custmomer Account Number to another query. In the second query, create one variable on Customer Account Number with type Replacment Path. Here it will ask you to enter the name of the query from which you would like to take the values of Customer Account Number.
    When you will run the second query , it will execute the first query from which you want to read the customer accoutn number in the back-end. And it willl display the output the second query as per the valeus of customer account number.
    This will help.
    - Jaimin

Maybe you are looking for

  • Delete songs from a playlist folder?

    I am trying to delete some songs from a playlist folder. Songs won't delete from any folder, regardless of whether i am in itunes 10 or the newly installed itunes 12. The delete function is greyed out. In playlists, yeah I can delete songs. But in fo

  • Firewire daisy-chain trouble with Leopard. Will a hub help?

    I cannot get reliable daisy-chaining of my external Firewire drives under Leopard. A Firewire drive directly attached to computer will work, but subsequent daisy-chains to this drive will not mount more than half the time. I ended up getting corrupti

  • Persistent messages from a stranger.

    I'm getting messages from "wynnbailey268". They're blocked and the explanation shown is "You are currently blocking messages from users who are not in your contact list. To communicate with this user you will need to either add them to your contacts

  • Tried to convert a large PDF to word. Timed Out....tried 3 times

    I tried to convert a very large PDF document to word three times; it timed out all three times, solution? Thanks Rick

  • Where to find Adobe PhotoDeluxe 3.0 ?

    Not sure where to post this, but I need to have Adobe PhotoDeluxe 3.0 (for my old G4 computer). I'm sure I can download it from somewhere since it's an old application/software, but where ?