CreateInsert and LOV with multiple return values

HI. I am on Build JDEVADF_11.1.2.3.0_GENERIC_120914.0223.6276.1
I have a View Object which is based on Entity Object.
View Object has customer_name and customer_id attributes.
customer_name attribute has LOV (input field with LOV) based on some other View Object (which of caurse holds customer name and customer id data)
I defined that when LOV return the chosen values it will populate customer_name with "Customer Name" value and customer_id with "Customer Id" value
All atributes are updatable
I droped my View Object on the page and also "CreateInsert" buton. When I click on "CreateInsert" button, I can see new row added as expected, customer_name field has LOV. I can choose from LOV and can see customers and customer_id data. But when I click OK in the LOV pop-up only customer_name attribute is populated!
I do see that customer_id is returned from LOV (I implemented ReturnPopupEvent listener), but still the customer id remains empty.
I though maybe I need to add LOV as auto submit = true and set LOV to be a partial trigger for customer_id. But still  - it didn't help
However, if I run Application Module tester, I do get what I want. I can create new row and when I change customer name , both customer name and customer id fields are populated
Please advice

Hi Michael,
On Lov VO, make sure you have at least one or combination of attributes as Key attribute. and re test.
Thanks,
Jeet

Similar Messages

  • LOV problem with multiple return values.

    I created a ViewObject and in it a transient attribute.
    I create a ViewAccessor for another field and a LOV for it (default InputText with Lov Value).
    In List Return Values I added also my tranient attribute in order to receive another attribute from the accesor VO.
    When I run it from the Application browser I see my transient attribute emtpty even if the "source" attribute is not empty.
    If I change the value from the LOV the source value changes bit the transient is still empty.
    What's wrong ?
    Tks
    Tullio

    Repost.

  • Multi-Select LOV with multiple return columns

    Hi,
    I'm wondering if it's possible (and how) to return more columns from the LOV page the calling page. Default only 1 column is displayed in the LOV and 1 column is returned.
    However it's easy to display an additional column in the LOV: Just copy the column tag change the binding column to display and change the prompt.
    Furthermore in my situation I don't have a FK between the calling page and LOV. It's just a LOV which returns values which can be edited after.
    Regards,
    Marcel

    Marcel,
    In the upcoming release it will be possible to supply a comma-separated list in the 'Lookup Display Attributes' field, so that multiple fields are shown in the LOV.
    When you use UIX and have an Entity Association to the Entity Object in the LOV, passing back multiple fields is already possible. But in your case, you will probably have to use your own javascript to implement this functionality.
    Kind regards,
    Peter Ebell
    JHeadstart Team

  • Multiple return values (Bug-ID 4222792)

    I had exactly the same request for the same 3 reasons: strong type safety and code correctness verification at compile-time, code readability and ease of mantenance, performance.
    Here is what Sun replied to me:
    Autoboxing and varargs are provided as part of
    JSRs 14 and 201
    http://jcp.org/en/jsr/detail?id=14
    http://jcp.org/en/jsr/detail?id=201
    See also:
    http://forum.java.sun.com/forum.jsp?forum=316
    http://developer.java.sun.com/developer/earlyAccess/adding_generics/index.html
    Multiple return values is covered by Bug-ID 4222792
    Typically this is done by returning an array.
    http://developer.java.sun.com/developer/bugParade/bugs/4222792.html
    That's exactly the problem: we dynamically create instances of array objects that would better fit well within the operand stack without stressing the garbage collector with temporary Array object instances (and with their backing store: 2 separate allocations that need to be recycled when it is clearly a pollution that the operand stack would clean up more efficiently)
    If you would like to engage in a discussion with the Java Language developers, the Generics forum would be a better place:
    http://forum.java.sun.com/forum.jsp?forum=316
    I know that (my report was already refering to the JSR for language extension) Generics is not what I was refering to (even if a generic could handle multiple return values, it would still be an allocated Object
    instance to pack them, i.e. just less convenient than using a static class for type safety.
    The most common case of multiple return values involve values that have known static datatypes and that should be checked with strong typesafety.
    The simple case that involves returning two ints then will require at least two object instances and will not solve the garbage collection overhead.
    Using a array of variable objects is exactly similar, except that it requires two instances for the components and one instance for the generic array container. Using extra method parameters with Integer, Byte, ... boxing objects is more efficient, but for now the only practical solution (which causes the least pollution in the VM allocator and garbage collector) is to use a custom class to store the return values in a single instance.
    This is not natural, and needlessly complexifies many interfaces.
    So to avoid this pollution, some solutions are used such as packing two ints into a long and returning a long, depacking the long after return (not quite clean but still much faster at run-time for methods that need to be used with high frequencies within the application. In some case, the only way to cut down the overhead is to inline methods within the caller code, and this does not help code maintenance by splitting the implementation into small methods (something that C++ can do very easily, both because it supports native types parameters by reference, and because it also supports inline methods).
    Finally, suppose we don't want to use tricky code, difficult to maintain, then we'll have to use boxing Object types to allow passing arguments by reference. Shamely boxed native types cannot be allocated on the operand stack as local variables, so we need to instanciate these local variables before call, and we loose the capacity to track the cases where these local variables are not really initialized by an effective call to the method that will assign them. This does not help debugging, and is against the concept of a strongly typed language like Java should be:
    Java makes lots of efforts to track uninitialized variables, but has no way to determine if an already instanciated Object instance refered in a local variable has effectively received an effective assignment because only the instanciation is kept. A typical code will then need to be written like this:
    Integer a = null;
    Integer b = null;
    if (some condition) {
    //call.method(a, b, 0, 1, "dummy input arg");
    // the method is supposed to have assigned a value to a and b,
    // but can't if a and b have not been instanciated, so we perform:
    call.method(a = new Integer(), b = new Integer(), 0, 1, "dummy input
    arg");
    // we must suppose that the method has modified (not initialized!)
    the value
    // of a and b instances.
    now.use(a.value(), b.value())
    // are we sure here that a and b have received a value????
    // the code may be detected at run-time (a null exception)
    // or completely undetected (the method() above was called but it
    // forgot to assign a value to its referenced objects a and b, in which
    // case we are calling in fact: now.use(0, 0); with the default values
    // or a and b, assigned when they were instanciated)
    Very tricky... Hard to debug. It would be much simpler if we just used:
    int a;
    int b;
    if (some condition) {
    (a, b) = call.method(0, 1, "dummy input arg");
    now.use(a, b);
    The compiler would immediately detect the case where a and b are in fact not always initialized (possible use bere initialization), and the first invoked call.method() would not have to check if its arguments are not null, it would not compile if it forgets to return two values in some code path...
    There's no need to provide extra boxing objects in the source as well as at run-time, and there's no stress added to the VM allocator or garbage collector simply because return values are only allocated on the perand stack by the caller, directly instanciated within the callee which MUST (checked at compile-time) create such instances by using the return statement to instanciate them, and the caller now just needs to use directly the variables which were referenced before call (here a and b). Clean and mean. And it allows strong typechecking as well (so this is a real help for programmers.
    Note that the signature of the method() above is:
    class call {
    (int, int) method(int, int, String) { ... }
    id est:
    class "call", member name "method", member type "(IILjava.lang.string;)II"
    This last signature means that the method can only be called by returning the value into a pair of variables of type int, or using the return value as a pair of actual arguments for another method call such as:
    call.method(call.method("dummy input arg"), "other dummy input arg")
    This is strongly typed and convenient to write and debug and very efficient at run-time...

    Can anyone give me some real-world examples where
    multiple return values aren't better captured in a
    class that logically groups those values? I can of
    course give hundreds of examples for why it's better
    to capture method arguments as multiple values instead
    of as one "logical object", but whenever I've hankered
    for multiple return values, I end up rethinking my
    strategy and rewriting my code to be better Object
    Oriented.I'd personally say you're usually right. There's almost always a O-O way of avoiding the situation.
    Sometimes though, you really do just want to return "two ints" from a function. There's no logical object you can think of to put them in. So you end up polluting the namespace:
    public class MyUsefulClass {
    public TwoInts calculateSomething(int a, int b, int c) {
    public static class TwoInts {
        //now, do I use two public int fields here, making it
        //in essence a struct?
       //or do I make my two ints private & final, which
       //requires a constructor & two getters?
      //and while I'm at it, is it worth implementing
      //equals(), how about hashCode()? clone()?
      //readResolve() ?
    }The answer to most of the questions for something as simple as "TwoInts" is usually "no: its not worth implementing those methods", but I still have to think about them.
    More to the point, the TwoInts class looks so ugly polluting the top level namespace like that, MyUsefulClass.TwoInts is public, that I don't think I've ever actually created that class. I always find some way to avoid it, even if the workaround is just as ugly.
    For myself, I'd like to see some simple pass-by-value "Tuple" type. My fear is it'd be abused as a way for lazy programmers to avoid creating objects when they should have a logical type for readability & maintainability.
    Anyone who has maintained code where someone has passed in all their arguments as (mutable!) Maps, Collections and/or Arrays and "returned" values by mutating those structures knows what a nightmare it can be. Which I suppose is an argument that cuts both ways: on the one hand you can say: "why add Tuples which would be another easy thing to abuse", on the other: "why not add Tuples, given Arrays and the Collections framework already allow bad programmers to produce unmainable mush. One more feature isn't going to make a difference either way".
    Ho hum.

  • How to populate right side of Shuttle with display/return values?

    Hello,
    I know, that the proper way to populate the right side of shuttle is that:
    declare
         v_list     apex_application_global.vc_arr2;
    begin
         select profile_name return_value
           bulk     collect
           into     v_list
           from     user_profiles
          where     user_id = :p61_user_id;
         return (apex_util.table_to_string (v_list));
    end;It is comfortable for the user to see the name of the profile.
    However, I need a profile_id as a return value, like I have it on the left side of the shuttle.
    The left side of the shuttle is populated with a select list with display/return values, as you know.
    I need both sides of the shuttle to return profile_id in order to create a merge.
    How is it possible to populate the right side of the Shuttle with display/return values?

    All you have to do is to use the subset of shuttle query to assign value to the right side shuttle.
    http://apex.oracle.com/pls/apex/f?p=50942:95
    I have created a dummy page with shuttle query
    SELECT ename, empno FROM emp ORDER by 1then I have defined a pl-sql before header process to assign values to shuttle variable
    using the code
    begin
    :P95_SHUTTLE := '7566:219:7900:7782:90';
    end;since 90 is not one the result set of the shuttle query it is getting displayed as number, and for others it is displaying the text. Thanks.
    --Manish                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to create a procedure function with a return value of ref cursor?

    Can anybody provide a sample about how to create a procedure function with a return value of REF CURSOR?
    I heard if I can create a function to return a ref cursor, I can use VB to read its recordset.
    Thanks a lot.

    http://osi.oracle.com/~tkyte/ResultSets/index.html

  • Difficulty in creating a chart by using a function with a returned value

    Hi,
    I am having a problem in using own function to create chart a with a returned value as the chart. If not using the returned value, it works fine.
    Is this a known issue?

    If you share some code, we might be able to help you.

  • T-SQL and CLR types for return value do not match

    Hi I am trying to create a CLR function to call a webservice, the CLR function return data type is double, whether I try
    to create this as a table valued funcion or a scalar to return a distance travelled value I am receiving the error below. I've tried changing data types around in the CLR side and the SQL side but keep receiving the same error message, any help would be appreciated,
    Thank you,
    [Microsoft.SqlServer.Server.SqlFunction(Name = "DistanceCalc")]
    public static Double DistanceCalc(Double SrcLat, Double SrcLong,
    Double DestLat, Double DestLong)
    MileageWS ws = new MileageWS();
    ws.Url = "http://test.isp.ca/Distance.asmx";
    int intUom = 0; // 0 = Mile, 1 = KM
    RouteType RouteMethod = RouteType.Practical;
    Requester RequestedFrom = Requester.LinkRoute;
    Double distance;
    distance = ws.GetDistanceInfoForLonLat(SrcLat, SrcLong, DestLat, DestLong, intUom, RouteMethod, RequestedFrom);
    return distance;
    CREATE FUNCTION DistanceCalc
    @SrcLat as float, @SrcLong as float,
    @DestLat as float, @DestLong as float
    RETURNS TABLE (Distance float)
    External NAME CLRfunctions.RIFunctions.DistanceCalc
    GO
    Error received when try to Create function ...
    1, Level 16, State 2, Procedure pcMiler, Line 6
    CREATE FUNCTION for "pcMiler" failed because T-SQL and CLR types for return value do not match.

    You defined at table-valued CLR function, but I think you meant to define a scalar CLR function. That might be the cause of the error.
    RETURNS TABLE (Distance float)
    should be
    RETURNS (Distance float)

  • Ufsdump and ufsrestore with multiple volumes

    How to ufsdump and ufsrestore with multiple volumes?
    I want to backup and restore a large directory with ufsdump and
    ufsrestore, so it requires multiple tapes (two in this example).
    After backuping tape 1, I press the eject button of the tape drive to
    eject the button, then I insert a second tape and type "yes" to
    continue.
    # /usr/sbin/ufsdump 0uf /dev/rmt/0cn /opt/bsm
    DUMP: 89.66% done, finished in 0:04
    DUMP: End-of-tape detected
    DUMP: 92.68% done, finished in 0:03
    DUMP: Change Volumes: Mount volume `#2' on `pwdly0ee:/dev/rmt/0cn'
    DUMP: NEEDS ATTENTION: Is the new volume (#2) mounted on
    `pwdly0ee:/dev/rmt/0cn' and ready to go?: ("yes" or "no")
    DUMP: NEEDS ATTENTION: Is the new volume (#2) mounted on
    `pwdly0ee:/dev/rmt/0cn' and ready to go?: ("yes" or "no")
    DUMP: NEEDS ATTENTION: Is the new volume (#2) mounted on
    `pwdly0ee:/dev/rmt/0cn' and ready to go?: ("yes" or "no") ye
    DUMP: NEEDS ATTENTION: Is the new volume (#2) mounted on
    `pwdly0ee:/dev/rmt/0cn' and ready to go?: ("yes" or "no") yes
    DUMP: "yes" or "no"?
    DUMP: NEEDS ATTENTION: Is the new volume (#2) mounted on
    `pwdly0ee:/dev/rmt/0cn' and ready to go?: ("yes" or "no") yes
    DUMP: Volume 2 begins with blocks from inode 430787
    DUMP: 92.70% done, finished in 0:03
    DUMP: Change Volumes: Mount volume `#2' on `pwdly0ee:/dev/rmt/0cn'
    DUMP: NEEDS ATTENTION: Is the new volume (#2) mounted on
    `pwdly0ee:/dev/rmt/0cn' and ready to go?: ("yes" or "no") yes
    DUMP: Volume 2 begins with blocks from inode 430787
    DUMP: 92.70% done, finished in 0:03
    DUMP: 4731838 blocks (2310.47MB) on 2 volumes at 840 KB/sec
    DUMP: DUMP IS DONE
    DUMP: Level 0 dump on Sat 08 Nov 2003 02:53:58 PM EST
    # /usr/sbin/ufsrestore rf /dev/rmt/0cn
    Mount volume 2
    then enter volume name (default: /dev/rmt/0cn)
    Mount volume 3
    then enter volume name (default: /dev/rmt/0cn) <- insert second tape
    Wrong volume (2)
    Mount volume 3
    then enter volume name (default: /dev/rmt/0cn) 2
    Cannot open 2
    Mount volume 3
    then enter volume name (default: 2)
    Cannot open 2
    Mount volume 3
    After tape 1 in finished restoring, I eject the tape and insert the
    second tape.
    Now what should I do to continue tape restoring?

    I don't think that you're supposed to type in the number "2". What ufsrestore is looking for is the next ufsrestore volume, not the volume number. If it is a tape drive, which this apears to be, you specify the tape drive device: dev/rmt/0cn.

  • Find and replace with multiple files and with a watch folder

    I am trying to create a watch folder that uses red_menace script to:
    1. Have a folder that receives multiple xml files that run the script one by one.
    2. then move the files to an output folder.
    I tried modifying the set TheFIle to choose file -- the original text file to:
    with multiple selections allowed
    But that doesn't seem to work. I know i'm missing a step. Any help is much appreciated!
    Thanks!
    The way i'd like to setup things is having an input folder on the desktop (or just have the application on the desktop and I can drag the files onto it), and let it do it's thing. Once it's done have it export the xml files into an output folder.
    Here's what i got so far:
    on open
    set TheFIle to choose file -- the original text file
    set TheFolder to ("Macintosh HD:Users:user1:Desktop:out") -- the folder for the output file
    set TheName to (GetUniqueName for TheFIle from TheFolder) -- the name for the output file
    set TheText to read TheFIle -- get the text to edit
    set Originals to {"KPCALDATE", "KPCALEVENT", "KPCALDAY", "KPCALBODY", "obituaries name", "" & return & "</cstyle></pstyle>" & return & "<pstyle name=\"obituaries text\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>", " .com", " .net", " .org", " .edu", "www .", "www. ", "Ho- nolulu", "<pstyle name=\"kicker 12\"><cstyle allcaps=\"1\">fashion news</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "<component name=\"Headline 1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline 1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 36\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>-", "-", "
    Per serving:", "<pstyle name=\"Titlebar - mini, red\"><cstyle allcaps=\"1\">NATION & World </cstyle><cstyle allcaps=\"1\">Report</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "</cstyle></pstyle>"} -- the terms that can be replaced
    set Replacements to {"subhed", "subhed", "subhed", "Normal", "obituaries text", ", ", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>
    ", ".com", ".net", ".org", ".edu", "www.", "www.", "Honolulu", "", "<component name=\"Headline1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 27\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>—", " —", "
    Per serving:", "","" & return & "</cstyle></pstyle>"} -- the replacement terms
    repeat with AnItem from 1 to count Originals
    set TheText to (replaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
    end repeat
    try -- write a new output file
    tell application "Finder" to make new file at TheFolder with properties {name:TheName}
    set OpenFile to open for access (result as alias) with write permission
    write TheText to OpenFile starting at eof
    close access OpenFile
    on error errmess
    try
    log errmess
    close access OpenFile
    end try
    end try
    end open
    to GetUniqueName for SomeFile from SomeFolder
    check if SomeFile exists in SomeFolder, creating a new unique name if needed
    parameters - SomeFile [mixed]: a source file path
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique file name and extension
    set {Counter, Divider} to {"00", "_"}
    -- get the name and extension
    set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
    if TheExtension is missing value then set TheExtension to ""
    set TheName to text 1 thru -((count TheExtension) + 2) of TheName
    set NewName to TheName & "." & TheExtension
    tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & "." & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName
    to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
    displays a dialog for multiple item edit (note that a return is used between each edit item)
    for each of the items in SomeItems, a line containing it's text is placed in the edit box
    the number of items returned are padded or truncated to match the number of items in SomeItems
    parameters - SomeItems [list]: a list of text items to edit
    TheTitle [boolean/text]: use a default or the given dialog title
    ThePrompt [boolean/text]: use a default or the given prompt text
    returns [list]: a list of the edited items, or {} if error
    set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
    if TheCount is less than 1 then return {} -- error
    if ThePrompt is in {true, false} then -- "with" or "without" Prompt
    if ThePrompt then
    set ThePrompt to "Edit the following items:" & return -- default
    else
    set ThePrompt to ""
    end if
    else -- fix up the given prompt a little
    set ThePrompt to ThePrompt & return
    end if
    if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
    set TheTitle to "Multiple Edit Dialog" -- default
    else
    set TheTitle to ""
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
    set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
    repeat with AnItem from 1 to TheCount -- pad/truncate entered items
    try
    set the end of TheItems to (item AnItem of TheInput)
    on error
    set the end of TheItems to ""
    end try
    end repeat
    return TheItems
    end EditItems
    to replaceText of SomeText from OldItem to NewItem
    replace all occurances of OldItem with NewItem
    parameters - SomeText [text]: the text containing the item(s) to change
    OldItem [text]: the item to be replaced
    NewItem [text]: the item to replace with
    returns [text]: the text with the item(s) replaced
    set SomeText to SomeText as Unicode text -- TID's are case insensitive with Unicode text
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
    set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
    set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
    return SomeText
    end replaceText
    Message was edited by: gamebreakers

    When you use the open or adding folder items to handlers, you need to add the parameters for the file items passed to them.
    I'll go ahead and post the applet/droplet version of my original script from the previous topic for reference:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    -- search and replace multiple items applet/droplet/folder action
    -- the terms to replace - edit as needed
    property EditableItems : {¬
    "one", ¬
    "two", ¬
    "three", ¬
    "four", ¬
    "five", ¬
    "six", ¬
    "seven", ¬
    "eight", ¬
    "nine", ¬
    "ten", ¬
    "eleven", ¬
    "twelve", ¬
    "thirteen", ¬
    "fourteen", ¬
    "fifteen", ¬
    "sixteen", ¬
    "seventeen", ¬
    "eighteen", ¬
    "nineteen", ¬
    "twenty"}
    -- the folder for the output file(s) - change as needed
    property TheFolder : (path to desktop)
    property LastEditItems : EditableItems
    on run
    the applet/droplet was double-clicked
    open (choose file with multiple selections allowed)
    end run
    on open TheItems
    items were dropped onto the applet/droplet
    parameters - TheItems [list]: a list of the items (aliases) dropped
    returns nothing
    repeat with AnItem in TheItems
    ReplaceMultipleItems from AnItem
    end repeat
    end open
    on adding folder items to this_folder after receiving these_items
    folder action - items were added to a folder
    parameters - this_folder [alias]: the folder added to
    these_items [list]: a list if items (aliases) added
    returns nothing
    repeat with AnItem in these_items
    ReplaceMultipleItems from AnItem
    end repeat
    end adding folder items to
    to ReplaceMultipleItems from SomeFile
    replace multiple text items in SomeFile
    parameters - SomeFile [alias]: the file to replace items in
    returns nothing
    set TheName to (GetUniqueName for SomeFile from TheFolder) -- the name for the output file
    set TheText to read SomeFile -- get the text to edit
    set Originals to (choose from list EditableItems default items LastEditItems with prompt "Select the terms to replace:" with multiple selections allowed) -- the specific terms to replace
    set LastEditItems to Originals
    set Replacements to (EditItems of Originals with Title given Prompt:"Edit the following replacement terms:") -- the replacement terms
    repeat with AnItem from 1 to count Originals
    set TheText to (ReplaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
    end repeat
    try -- write a new output file
    tell application "Finder" to make new file at TheFolder with properties {name:TheName}
    set OpenFile to open for access (result as alias) with write permission
    write TheText to OpenFile starting at eof
    close access OpenFile
    on error errmess
    try
    log errmess
    close access OpenFile
    end try
    end try
    end ReplaceMultipleItems
    to GetUniqueName for SomeFile from SomeFolder
    check if SomeFile exists in SomeFolder, creating a new unique name if needed
    parameters - SomeFile [mixed]: a source file path
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique file name and extension
    set {Counter, Divider} to {"00", "_"}
    -- get the name and extension
    set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
    if TheExtension is in {missing value, ""} then
    set TheExtension to ""
    else
    set TheExtension to "." & TheExtension
    end if
    set {NewName, TheExtension} to {TheName, (ChangeCase of TheExtension to "upper")}
    set TheName to text 1 thru -((count TheExtension) + 1) of TheName
    tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName
    to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
    displays a dialog for multiple item edit (note that a return is used between each edit item)
      for each of the items in SomeItems, a line containing it's text is placed in the edit box
        the number of items returned are padded or truncated to match the number of items in SomeItems
    parameters - SomeItems [list]: a list of text items to edit
    TheTitle [boolean/text]: use a default or the given dialog title
    ThePrompt [boolean/text]: use a default or the given prompt text
    returns [list]: a list of the edited items, or {} if error
    set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
    if TheCount is less than 1 then return {} -- error
    if ThePrompt is in {true, false} then -- "with" or "without" Prompt
    if ThePrompt then
    set ThePrompt to "Edit the following items:" & return -- default
    else
    set ThePrompt to ""
    end if
    else -- fix up the given prompt a little
    set ThePrompt to ThePrompt & return
    end if
    if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
    set TheTitle to "Multiple Edit Dialog" -- default
    else
    set TheTitle to ""
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
    set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
    repeat with AnItem from 1 to TheCount -- pad/truncate entered items
    try
    set the end of TheItems to (item AnItem of TheInput)
    on error
    set the end of TheItems to ""
    end try
    end repeat
    return TheItems
    end EditItems
    to ReplaceText of SomeText from OldItem to NewItem
    replace all occurances of OldItem with NewItem
    parameters - SomeText [text]: the text containing the item(s) to change
    OldItem [text]: the item to be replaced
    NewItem [text]: the item to replace with
    returns [text]: the text with the item(s) replaced
    set SomeText to SomeText as text
    if SomeText contains OldItem then
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
    try
    set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
    set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
    on error ErrorMessage number ErrorNumber -- oops
    set AppleScript's text item delimiters to TempTID
    error ErrorMessage number ErrorNumber
    end try
    end if
    return SomeText
    end ReplaceText
    to ChangeCase of SomeText to CaseType
    changes the case or capitalization of SomeText to the specified CaseType using Python
    parameters - SomeText [text]: the text to change
    CaseType [text]: the type of case desired:
    "upper" = all uppercase text
    "lower" = all lowercase text
    "title" = uppercase character at start of each word, otherwise lowercase
    "capitalize" = capitalize the first character of the text, otherwise lowercase
    returns [text]: the changed text 
    set SomeText to SomeText as text
    if CaseType is not in {"upper", "lower", "title", "capitalize"} then return SomeText
    return (do shell script "/usr/bin/python -c \"import sys; print unicode(sys.argv[1], 'utf8')." & CaseType & "().encode('utf8')\" " & quoted form of SomeText)
    end ChangeCase
    </pre>
    Edit: how does the choose from list dialog handle those big strings? I'm guessing not very well - is that why you avoided using them?
    Message was edited by: red_menace

  • LOV with different query values

    Hi,
    I am using JDeveloepr 11.1.1.1.4 and ADF-BC in my project.
    In my project,in one of the pages,I need to open a popup on click of button[near an input box] and show an LOV in the popup.
    On selection of the value in the LOV and some business logic,the value has to be set to the input box in the calling page.
    I have 10 input fields in my page,with 10 buttons besides them and I have to open the same popup and same kind of business logic needs to be implemented to return and set the values
    in the calling page except that the query to display the LOV values is different each time.
    Basically same popup page needs to be displayed every time,but the query to display the values for LOV is different every time.
    If LOV is built through read only view object,then I cannot the change query :(
    Please advice on how to achieve this.
    Thanks,
    Praveen

    Assume the following sample as per your use-case.
    Departments VO is to shown as a LOV for ten different attributes in Employees VO, but the set of departments to be shown are different for each LOV/attribute.
    For each of the attributes in Employees VO, while defining the LOV, create separate view accessor for each of the attributes. In your case, as each of the LOV are totally distinct, you might need 10 different accessors for each of the attributes defined as a LOV in Employees VO.
    For applying view criteria, you could apply different view criteria for different view accessors created as follows:
    As for example, for attribute1 in employees VO, you would like to show only departments starting with 'A'. In this case, define a view criteria in Departments VO as DeptWithStartingA.
    Now in the Employees VO, for attribute1, select the view accessors created by moving to the view accessor tab & shuttle the VC to be executed.
    Similarly do for all other attributes.
    Why can't we use single view accessor for all the attributes? - you cannot because while you select a value for one attribute defined as LOV in employeesVO, the corresponding row is set as selected. But when you choose the other attribute using LOV, all other previous selections would point to the same.
    Thanks,
    Navaneeth

  • How to avoid SYSTEM_NO_TASK_STORAGE  with multiple single values variable

    Hi experts,
    I am trying to do a distribution with reference data standart SAP function.
    Fields to be changed:
    ZPDHIER2 (Economic Group II)
    ZPDHIER3 (Economic Group III)
    ZPDCLIENT (Client)
    Fields for condition:
    KEY FIGURE NAME
    Fields for reference:
    KEY FIGURE NAME
    ZPDSTATUS (Status)
    FISCPER3 (Fiscal Period)
    The parameters group is like:
    Fields for condition:
    Key figure: ZM_070 (one of the key figures)
    Fields for reference:
    Key figure: ZMONT_TN
    FISCPER3: 001
    Status: DE
    - "Only distribute not assigned" is checked
    I do not want the data to be distributed by any ZPDHIER2, ZPDHIER3 and ZPDCLIENT so I have restricted these characteristics in the planning level by some variables. These variables are user exit type and return multiple single values.
    The issue regarding this message is that when I execute this function, depending on the size of the data brought by ZPDCLIENT user exit variable, this dump might or might not occur. As for the testing I've done, i realize that if the number of clients exceed 500, dump will occur.
    This multiple single values variable (or any other solution) must be prepared for 3900 clients, and this number is expected to increase.
    Anyone have faced same problem?
    Hope you can provide me some help regarding this issue.
    Tanks in advance,
    André Oliveira

    Hi Wadih saad,
    I think the memory is not suffcient to hold the load. Check your swap space and memory during the client export and also check whether there is sufficient space in the hard disk to hold the export files.
    You must have calculated the client size by using the test run. This size must be available as free space in hard disk to do the export.
    Make the available space and do the export it will work.
    Regards,
    Maheswaran J

  • LOV does not return value to the base page sometimes

    Hi,
    I have created messageLOV type items. These LOVs do return value to the base page usually. We have a user in Uruguay who is trying to use the page which has the LOVs. He says the LOV takes a long time to return to the main page after he clicks on quick select and also the value does not get populated in the main page.
    We have not been facing any such problem here in India. The LOV has been tested rigorously with no issues as such.
    Can you please suggest a reason why such a problem is occuring? Expecting your replies soon
    Thanks,
    Priya

    Thiyaga, did you read the devguide or the tutorial ?
    Can you please give me the inputs about the creation of LOV and it requires how many lov mappings as mandatory?
    This is there in the devguideHow to identify the mapping fields of an LOV which is already existing in the base page to reproduce in a similar way and need to do a customization on top of it ?
    Open the page XML and you can find the LOV mappings.Tapash

  • Security Attributes with Multiple/NULL values

    I have a couple of situations where I can't seem to get the authorization component working as I need it to work for a database source.
    1) In the first case, I have two attributes set for "grant security attributes" in the data source, one of which has a single attribute value, and the other which has multiple values, e.g.
    I want to set "grant security attributes" to something like "client_id role_id" where for my dataset, client_id will always be a single numeric value, but I might have multiple role_ids that can view this record. How do I specify in my data source query those multiple attribute values? I tried separating them with spaces, e.g.
    SELECT ...
    'A B' role_id
    FROM
    where "A" and "B" represent unique values (looking to match A OR B). I also tried delimiting them with commas, but neither spaces nor commas seems to work consistently.
    On the authorization end, using oracle.search.plugin.security.auth.db.DBAuthManager as the authorization plug-in, I have the authorization query set as
    SELECT client_id, security_lvl as role_id from test_user_id where user_id = ?
    Each user may have more than one role, so in the above query, security_lvl could be something like "B C"; I'm assuming from the documentation that the delimiter for attribute values in this case should be a space.
    The crawler logs make it appear that everything is getting indexed, so I suspect the issue is on the authorization front.
    2) In the second case, one of my security attributes for the data source may be NULL, meaning that there's no particular authorization restriction on a particular record, so to use the same example as in #1,
    role_id might be NULL for some records, in which case, I want those records returned in the search if the client_id matches, but I can't get the records with the NULL role_id to be returned at all. Again, the crawler logs indicate that everything is being indexed, and I'm not sure if there's a log where I can further troubleshooting authorization issues.
    Any guidance would be appreciated.
    Thanks

    1) The security attributes are OR'd together so if the user has any ONE of the attributes (either client ID or role ID), the document can be seen by the user. What I would try is to create a view to call rather than directly against the table. The view can then leverage a PL/SQL function and encapsulate the logic behind the security tokens to return.
    So the view would look like this...
    CREATE OR REPLACE VIEW USER_SECURITY_V AS
    SELECT
    USER_T.ID,
    MY_SECURITY_FUNCTION(USER_T.ID) AS AUTH_ID
    FROM
    USER_T
    The PL/SQL function would look something like this...
    CREATE OR REPLACE FUNCTION MY_SECURITY_FUNCTION(USER_ID NUMBER) RETURN VARCHAR2 IS
    -- Do whatever you need to do to build a single space-deliminted list of tokens for both Client and Role ID "CLIENTID4 ROLEID5 ROLEID9" then return
    END;
    The data source authorization query then would look like this...
    SELECT AUTH_ID FROM USER_SECURITY_V A WHERE A.ID = ?
    Using a PL/SQL Function to control the tokens gives you the flexibility of modifying security without having to touch the data source directly
    2) I don't quite follow. If any ONE of the tokens match, the document is returned. If the role ID is null, you might try stamping each document a "master" security token indicating it's open to everyone such as "ALL". Then in the PL/SQL Function, return "ALL" in front of the actual values.
    The crawler logs will only tell you what is indexed at crawl time, not how searching is actually working. Try checking the server logs. These should be under something like oracle/ses/seshome/search/base_domain/servers/AdminServer/logs
    Hope this helps!

  • Calling web service via utl_dbws with unbounded return values

    Hello, everyone.
    I'm trying to use utl_dbws to call web service from Oracle DB 10 g.
    WS has unbounded return value:
    <xs:element maxOccurs='unbounded' minOccurs='0' name='return' type='xs:string'/>
    I'm setting return paramter in web service call handler like this:
    sys.UTL_DBWS.set_return_type(l_h_service_call, cs_qname_type_string);
    and when I'm trying to call it from PL/SQL function I'm getting an error:
    ORA-29532: Java call terminated by uncaught Java exception:
    deserialization error: XML reader error: unexpected character content: "s2"
    ORA-06512: at "SYS.UTL_DBWS", line 388
    ORA-06512: at "SYS.UTL_DBWS", line 385
    ORA-06512: at line 38
    I've tried to return values by out parameters and got the same exception.
    It looks like utl_dbws needs to know parameters count before calling.
    Have anyone succeded in getting arrays from Web Service call?
    This is a part of wsdl:
    <xs:complexType name='getProcessList'>
    <xs:sequence>
    <xs:element minOccurs='0' name='nameMask' type='xs:string'/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name='getProcessListResponse'>
    <xs:sequence>
    <xs:element maxOccurs='unbounded' minOccurs='0' name='return' type='xs:string'/>
    </xs:sequence>
    </xs:complexType>
    Throught SoapUI I can produce such kind of request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:proc="http://processmanager.argustelecom.ru/">
    <soapenv:Header/>
    <soapenv:Body>
    <proc:getProcessList>
    <processNameMask>*</processNameMask>
    </proc:getProcessList>
    </soapenv:Body>
    </soapenv:Envelope>
    and get a response:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <ns2:getProcessListResponse xmlns:ns2="http://processmanager.argustelecom.ru/">
    <return>s1</return>
    <return>s2</return>
    <return>s3</return>
    <return>s4</return>
    </ns2:getProcessListResponse>
    </env:Body>
    </env:Envelope>
    PL/SQL function:
    DECLARE
    cs_qname_type_string CONSTANT sys.UTL_DBWS.qname
    := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'string') ;
    cs_qname_type_int CONSTANT sys.UTL_DBWS.qname := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'int');
    cs_qname_type_any CONSTANT sys.UTL_DBWS.qname
    := sys.UTL_DBWS.to_qname('http://www.w3.org/2001/XMLSchema', 'anyType') ;
    cs_endpoint CONSTANT VARCHAR2(256) := 'http://server:8080/process-manager/ProcessManager';
    l_service sys.UTL_DBWS.service;
    l_service_qname sys.UTL_DBWS.qname;
    l_port_qname sys.UTL_DBWS.qname;
    l_operation_qname sys.UTL_DBWS.qname;
    l_h_service_call sys.UTL_DBWS.call;
    l_params sys.UTL_DBWS.anydata_list;
    l_ret_val SYS.ANYDATA;
    BEGIN
    l_service_qname := sys.UTL_DBWS.to_qname(NULL, 'ProcessManagerService');
    l_service := sys.UTL_DBWS.create_service(l_service_qname);
    l_port_qname := sys.UTL_DBWS.to_qname(NULL, 'ProcessListServiceBinding');
    l_operation_qname := sys.UTL_DBWS.to_qname('http://processmanager.argustelecom.ru/', 'getProcessList');
    l_h_service_call := sys.UTL_DBWS.create_call(l_service, l_port_qname, l_operation_qname);
    sys.UTL_DBWS.set_target_endpoint_address(l_h_service_call, cs_endpoint);
    -- return type
    sys.UTL_DBWS.set_return_type(l_h_service_call, cs_qname_type_any);
    -- param type
    sys.UTL_DBWS.ADD_PARAMETER(l_h_service_call, 'processNameMask', cs_qname_type_string, 'ParameterMode.IN');
    l_params(1) := anydata.convertvarchar2('*');
    l_ret_val := sys.UTL_DBWS.invoke(l_h_service_call, l_params);
    IF l_ret_val IS NULL THEN
    DBMS_OUTPUT.put_line('l_ret_val is null');
    ELSE
    DBMS_OUTPUT.put_line('l_ret_val is not null');
    END IF;
    sys.UTL_DBWS.release_call(l_h_service_call);
    END;
    Edited by: Ilya on 03.12.2008 3:50

    Hi Tony
    I'm not sure if you would have solved your problem by now, but with my recent experience with the utl_dbws package, for doc lits with complex data types, you have to call the service with an XML request, as opposed to passing the param array.
    If you still need details, reply accordingly.
    Ta
    cT

Maybe you are looking for

  • Há possibilidade de navegar sem aparecer a aba; navegar de página inteira

    Gostaria de navegar sem o aparecimento da aba na parte superior da tela. Isto proporcionará um aumento significativo na visualização de aplicativos. Como a tela do celular é pequena(Samsung Galaxy, Duos, Ace, etc a possibilidade de "retirada das abas

  • A lot of threads getting created on weblogic 10.3.2

    Hi here is the thread dump. can you help me in solving this Full thread dump Java HotSpot(TM) Server VM (14.0-b16 mixed mode): "scheduledJobsListenerContainer-55" prio=6 tid=0x4e7aac00 nid=0x2fac waiting on condition [0x51aaf000] java.lang.Thread.Sta

  • How to add a Parameter to a Module Specificat​ions, programati​cally

    There is a module (based on vi) which I would like to add an additional parameter. As a result of this, I would need to call all the program steps where this vi is specified, reload it, and place a value (or expression) for the new parameter. I wonde

  • Sharepoint online vs sharepoint on premise

    Hello Everyone Can anybody quote the Technical difference  between SharePoint online vs SharePoint (2013)on premise. Under which circumstances both should be opted for ? Regards Prashanth SharePoint Administrator

  • Very Slow to save Office 2013 files (Excel/Word) to a network share

    I have an issue with a customer's system whereby they experience problems with saving either a Word or Excel file to another workstation on the network. The network share is located on a Windows7 Pro x64 machine. The problem can be seen on a machine