How to set condition for my Choose From List

hi ..plz check my code...i want to set a condition on my CFL which opens GL Accounts..it has to show only Active Accounts...but when i run the program iam able to see all accounts..what might me the proble..
my code is as follows
'''''''''' load form
private sub loadform()
'' here iam loading form which is designed in Screen painter where i have a textbox (uid = 19) and CFL_2 as its choosefromlist and object type = 1 alias name = ActCode
conditionCFL()
oform.visble = true
end sub
'''''''''' end of load form
'''''''''setting condition
private sub ConditionCFL()
Try
            Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
            Dim oCons As SAPbouiCOM.Conditions
            Dim oCon As SAPbouiCOM.Condition
            oCFLs = oForm.ChooseFromLists
            Dim oCFL As SAPbouiCOM.ChooseFromList
            Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
            oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
            ' Adding 2 CFL, one for the button and one for the edit text.
            oCFLCreationParams.MultiSelection = False
            oCFLCreationParams.ObjectType = "1"
            oCFLCreationParams.UniqueID = "CFL1"
            oCFL = oCFLs.Add(oCFLCreationParams)
            ' Adding Conditions to CFL1
            oCons = oCFL.GetConditions()
            oCon = oCons.Add()
            oCon.Alias = "Postable"
            oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
            oCon.CondVal = "Y"
            oCFL.SetConditions(oCons)
            oCFLCreationParams.UniqueID = "CFL2"
            oCFL = oCFLs.Add(oCFLCreationParams)
        Catch
            MsgBox(Err.Description)
        End Try
end sub
'''''''''end of setting condition
i have still more code...plz follow the next code which is posted below.....

continuation from above code...plz foloow complete code
'''''''''''item event
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        Dim EventEnum As SAPbouiCOM.BoEventTypes
        EventEnum = pVal.EventType
        Try
            Select Case pVal.EventType
                Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
                    If pVal.BeforeAction = True Then
                      Dim oCFLEvent As SAPbouiCOM.IChooseFromListEvent = DirectCast(pVal, SAPbouiCOM.IChooseFromListEvent)
                        Dim oDataTable As SAPbouiCOM.DataTable = oCFLEvent.SelectedObjects
                        Dim val As String
                        Try
                            If pVal.ItemUID = "19" Then
                               Me.oDBDataSource.SetValue("U_BalenceSheet_Acct", 0, oCFLEvent.SelectedObjects.GetValue(0, 0))
                            End If
                         Catch ex As Exception
                            MsgBox(ex.ToString)
                        End Try
                    End If
                    Exit Select
            End Select
                       Catch ex As Exception
                            MsgBox(ex.ToString)
                        End Try
end sub
''''''''''end of item event
Edited by: Shenaz Sultana on Nov 13, 2009 2:18 PM

Similar Messages

  • How to set variant for ALV grid from ABAP

    Hello,
    I have a program which displays some data with ALV grid. Then after some operation I would like to set different layout for the grid, but not by choosing it manually but by the program. I thought that it would be enough to use the method SET_VARIANT, so I'm setting DISVARIANT structure properly, using SET_VARIANT method and after that I'm calling REFRESH_TABLE_DISPLAY but layout is not changed. What else should I do? Is that possible?
    Best regards,
    Marcin

    Hi,
    Check this
    * While declaring select-options
    parameters: p_vari        like ltdx-variant.  " Layout
    * then add the following code in
    at selection-screen on value-request for p_vari.
      perform f_variant_f4 using p_vari.
    * Code for f_variant_f4
    form f_variant_f4 using  p_vari.
    * private variables
      data : v_exit    type c.
      clear gs_variantt.
      v_variant_save = 'U'.
      call function 'LVC_VARIANT_F4'
        exporting
          is_variant    = gs_variant
          i_save        = v_variant_save
        importing
          e_exit        = v_exit
          es_variant    = gs_variantt
        exceptions
          not_found     = 1
          program_error = 2
          others        = 3.
      if sy-subrc ne c_0.
        message i999(yscc) with text-064.    " No Layout Available for F4
      endif.
      if v_exit is initial.
        gs_variant-variant = gs_variantt-variant.
        p_vari             = gs_variantt-variant.
      endif.
    endform.                                 " F_variant_f4
    * In PBO
        call method grid1->set_table_for_first_display
          exporting
            is_layout                     = gs_layout
            is_variant                    = gs_variant
            i_save                        = 'A'
            it_toolbar_excluding          = i_exclude[]
          changing
            it_outtab                     = i_output[]
            it_fieldcatalog               = i_fieldcat[]
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4.

  • How to set Permissions for Mac HD from "No Access" to "Read only"

    Hi everyone! My friend's having a problem with her MacBook Pro. She accidentally changed the value of the Macintosh HD's privilege for everyone from Read only to No access. (See attached image for reference/guide). Seconds after, her Mac crashed. She rebooted her laptop, the Apple logo shows up with the usual scrolling week. Afterwards, the scrolling wheel disappears but the Apple logo is still there and it no longer proceeds to her login/desktop screen anymore.
    We already tried Repairing Disk Permissions (by pressing Command +R on bootup) and Repair Disks, rebooted, but it's still up to nothing. Unfortunately, she doesn't have a Time Machine backup.
    Is there a way to revert the changes even though the login/desktop screen can't be accessed? Is having the value "No access" on your Macintosh HD unsafe and will make you locked out of your system?
    I am looking forward to your fast and favorable feedback. :-)
    Thanks in advance!

    Is there a way to revert the changes even though the login/desktop screen can't be accessed? Is having the value "No access" on your Macintosh HD unsafe and will make you locked out of your system?
    There is currently no way to access the disk, no access means no access.
    Others may know better but I would backup the data on the drive, erase and reinstall.

  • How to set condition for Characteristic values in report

    Hi Experts,
    I have a report where the service order will have 1or more part and its corresponding part status.
    I want to highlight or give some indication to those service orders where all the parts status are Part Received.
    The service order with different part status can be ignored.
    FYI: I don't have any keyfigure in my report.
    Can anyone please advice me on this.
    Thanks

    Hi Ahmed,
    You cannot achieve this using this Conditions, as the condition can be defined on a characteristic but u cannot say that for a service orders all the parts status are PART RECEIVED.
    For this kind of requirements, you need to add an Flag (Characteristic) and check in the Transformation if all the Part Status are PART RECEIVED for a Service Order and mark the Flag as 'X'.
    In the report jst filter on the flag as 'X'. It should resolve.
    Regards,
    Chathia.

  • Choose from list - data display with condition

    Hi,
    I 've developed a form using screen painter, I ' ve attached a choose from list to fill GRPo Number.  In the choose from list the GRPo no. should not display again which once I have selected and saved. 
    Let me have a good solution please and it would be appreciated.
    Thanks & Regards,
    Venkatesan G.

    Hi suresh,
    where did you put this code?....In the choose_from_list event handler?..I've tried a similar solution, before reading your post, but it doesn't work because if i dynamically set the condition for the choose from list i got an empty table.
    i've tried to put my code when beforeaction=true and i have this kind of problem. The difference is that i need to set the filter starting with the value i've entered on the field connected to the choose from list. I put code here, so it's more clear
    If (pVal.Before_Action = True) And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST) Then
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        Dim oCons As SAPbouiCOM.Conditions
                        Dim oCon As SAPbouiCOM.Condition
                        Dim sItemCode As String
                        oEditText = oMatrix.Columns.Item("V_ItemCode").Cells.Item(pVal.Row).Specific
                        sItemCode = oEditText.Value.ToString
                        oCFL = oForm.ChooseFromLists.Item("CFL_Item")
                        oCons = oCFL.GetConditions()
                        oCon = oCons.Add()
                        oCon.Alias = "ItemCode"
                        oCon.Operation = SAPbouiCOM.BoConditionOperation.co_START
                        oCon.CondVal = sItemCode
                        oCFL.SetConditions(oCons)
                    End If
    My situation is that i type something in V_ItemCode column and after that i press the tab key to open the choose from list.
    Would be ok if i get the SAP standard beahviour too, that doesn't open the choose from list, but fills the field with the first code starting with what you type.
    Thanks in advance

  • Multiple Values For one Condition in Choose From List

    I have used one Business Partner Choose From List in my form but i want to give condition in that choose from list on GroupCode .But the condition will have multiple values like 100,102,104 then how i will write the code to incorporate multiple values for one single condition.

    Hi,
    Check this thread
    How to set a Multiple condition in a single CFL
    Hope that helps,
    Vasu Natari.

  • Choose from list for purchase  Item

    Dear Experts,
    i have created Choose from list in matrix using Screen Painter. its working properly but i want to display only Purchase Items in CFL.
    For Customer we are using
    oCons = oCFL.GetConditions()
                oCon = oCons.Add()
                oCon.Alias = "CardType"
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCon.CondVal = "C"
                oCFL.SetConditions(oCons)
    Like this, How to set condition for Purchase items thru coding or Screen painter
    Mathi

    Hi Mathi,
    Try this and tell me if it worked.
    oCons = oCFL.GetConditions()
    oCon = oCons.Add()
    oCon.Alias = "PrchseItem"
    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
    oCon.CondVal = "Y"
    oCFL.SetConditions(oCons)
    If this works dont forget to reward points..
    Regards,
    Vasu Natari.
    Edited by: vasu natari on Jul 29, 2008 12:37 PM

  • Choose from List Condition - SAP 9.0 visual studio 2010

    Hi,
    How to set condition for CFL. I am using SAP 9.0 Patch Level 12, Visual Studio 2010. I could find the event, ChooseFromListBefore event. I tried coding as below,but its not working:Got error like "Public member 'GetConditions' on type 'SBOItemEventArgClass' not found."
    Private Sub ChooseFromListBefore(sboObject As System.Object, pVal As SAPbouiCOM.SBOItemEventArg, ByRef BubbleEvent As System.Boolean) Handles EditText0.ChooseFromListBefore.
       Dim pCFL As SAPbouiCOM.ISBOChooseFromListEventArg = pVal
                     Dim oCond As SAPbouiCOM.Condition
                    Dim oconds As SAPbouiCOM.Conditions
                    ' Adding Conditions to CFL1
                   oconds = pCFL.GetConditions() --Getting error in this line.
                    oCond = oconds.Add()
                   oCond.Alias = AliasName
                    oCond.Operation = Operation
                    oCond.CondVal = CondVal
                     pCFL.SetConditions(oconds)
    end sub
    Any help is appreciated.
    Thanks in advance.
    Parvatha Solai.N

    Hi Parvatha,
    The conditions should get from the CFL object it self, not the CFL Event object.
    Dim oCFL = oForm.ChooseFromLists.Item("cflUID");
    oConds = oCFL.GetConditions();
    Regards
    Edy

  • I have a mac mini server which I want to set up for remote access from windows and mac pcs.  How do I do this.  I can access it form my home network OK

    I have a mac mini server which I want to set up for remote access from windows and mac pcs.  How do I do this.  I can access it form my home network OK

    Posted in error.

  • Delete/Edit/Update CFL Conditions - Choose From List

    Hi All,
    I have a Choose From List of which the conditions are set depending on a ComboBox.Selected.Value
    oCon.CondVal = comboboxBranch.Selected.Value
    So the Conditions are set when the "OnAfterComboSelect" event is trigered.           
    How do I reset the Condition when the user "RESELECTS" another ValidValue on that ComboBox???
    At the moment, on the Reselection on the Combobox, the CFL is returning EMPTY.....
    Thanks

    Hi Michael,
    Thanks for the speedy reply.  Its workin.
    Here's my code for the adding/editing of the Conditions from within the an Event Handler if any1 needs it.
    In the OnAfterFormLoad Event Handler:
    Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
    Dim oCFL As SAPbouiCOM.ChooseFromList
    Dim oCons As SAPbouiCOM.Conditions
    Dim oCon As SAPbouiCOM.Condition
    Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
    ' Adding CFL3 for Line GL Account Name.
    oCFLCreationParams.MultiSelection = False
    oCFLCreationParams.ObjectType = "1"
    oCFLCreationParams.UniqueID = "CFL3"
    oCFL = oCFLs.Add(oCFLCreationParams)
    In the 1st TabOrder Item's OnGotFocus Event Handler:
    oColumn = oColumns.Item("AcctCode")
    oColumn.ChooseFromListUID = "CFL3"
    oColumn.ChooseFromListAlias = "FormatCode"
    In the OnAfterComboSelect Event Handler:
    oCFLs = form.ChooseFromLists
    oCFL = oCFLs.Item("CFL3")
    oCons = oCFL.GetConditions()
    If oCons.Count = 0 Then
                    oCon = oCons.Add()
                    oCon.BracketOpenNum = 2
                    oCon.Alias = "GroupMask"
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                    oCon.CondVal = "7"
                    oCon.BracketCloseNum = 1
                    oCon.Relationship = BoConditionRelationship.cr_AND
                    oCon = oCons.Add()
                    oCon.BracketOpenNum = 1
                    oCon.Alias = "Postable"
                    oCon.Operation = BoConditionOperation.co_EQUAL
                    oCon.CondVal = "Y"
                    oCon.BracketCloseNum = 1
                    oCon.Relationship = BoConditionRelationship.cr_AND
                    oCon = oCons.Add()
                    oCon.BracketOpenNum = 1
                    oCon.Alias = "Segment_1"
                    oCon.Operation = BoConditionOperation.co_EQUAL
                    oCon.CondVal = comboboxBranch.Selected.Value
                    oCon.BracketCloseNum = 2
                    oCFL.SetConditions(oCons)
    Else
                    oCon = oCons.Item(2)
                    oCon.CondVal = comboboxBranch.Selected.Value
                    oCFL.SetConditions(oCons)
    End If

  • How to filter Choose from list object rows?

    Hi everyone,
    I'd like to show Choose from list window using SBO 2005 PL07, Actually I want to show the Active Account of G/L Account, I set the CFL object to one column as following:
    oCFLCreationParams.ObjectType = SAPbouiCOM.BoLinkedObject.lf_GLAccounts
    oCFLCreationParams.UniqueID = "CFL"
    oCFL = oCFLs.Add(oCFLCreationParams)
    Who knows how to set Choose From list object only show Active Account and do not show Title Account.
    Thanks for your help!
    Kathy

    Hi kathy
    I have not tried it on the gl accounts. But basicaly you need to add conditions to filter it. The following is an example that you would of used for business partners but only customers.
      Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
                Dim oCons As SAPbouiCOM.Conditions
                Dim oCon As SAPbouiCOM.Condition
                oCFLs = oForm.ChooseFromLists
                Dim oCFL As SAPbouiCOM.ChooseFromList
                Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
                oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                ' Adding 2 CFL, one for the button and one for the edit text.
                oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "2"
                oCFLCreationParams.UniqueID = "CFL1"
                oCFL = oCFLs.Add(oCFLCreationParams)
                ' Adding Conditions to CFL1
                oCons = oCFL.GetConditions()
                oCon = oCons.Add()
                oCon.Alias = "CardType"
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCon.CondVal = "C"
                oCFL.SetConditions(oCons)
                oCFLCreationParams.UniqueID = "CFL2"
                oCFL = oCFLs.Add(oCFLCreationParams)
    The above also compensates for the tab.
    Hope it helps

  • HOW TO: set anchoredObjectSettings for .palce() object?

    Hi, I'm currently working on interesting script for GREP placing, and I'm wondering how I can set anchoredObjectSettings for .palce() object?
    for(i=0; i < found.length; i++)
        foundElem = new File (myFolder + "/" + found[i].contents);
        found[i].place(foundElem); // Placing Ancored Object
        // HERE IS WHERE I NEED SOME HELP: how to set "anchoredObjectSettings" for just placed Ancored Object
        //anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
        //anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
    Here you can download example files - script, InDesign file and images, that should be placed into InDesign file with script
    Dropbox - GREP placing.zip
    PS: I believe this script will be very useful, so if anybody have any ideas/suggestions, and want to help me with further development - this would be great!

    Hi Kai, this script is still under development, here is updated version attached (now it can also place files/images by file name only, without extension):
    #target indesign;
    //#include  "! Basic functions.jsx"
        GREP place files.
        This script will ask to select source folder with files to place,
        and then, with dialog box (or prompt) [this is not implemented yet, so I use static GREP value while developing]
        will ask to type GREP find expresion to search for text placeholder, that need to be replaced with file from source folder we just selected.
        TODO: Check how it works with other than image formats
            Also, this might be usefull to make anchored frame with column widh, and fit image proportionally
    scriptName = decodeURI(File(app.activeScript).name.slice(0, -4)); // detect name of current script without expression
    function Alert(msg) // function for native-looking alerts
        w = new Window ("dialog", scriptName, undefined, {closeButton: true});
        w.preferredSize = [300,75]; // window width and height
        w.margins = 15; // window margins
        w.orientation = "column";
        w.alignChildren = ["left", "top"];
        w.add("statictext", undefined, msg);
        close = w.add ("button", [0,0,96,20], "OK", {name: "Ok"});
        close.alignment = ["right", "bottom"];
        close.onClick = function(){exit();}
        w.show();
    main();
    function main()
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        if(app.documents.length == 0)
            Alert("No documents are open. Please open a document and try again."); exit();
        else
            //> START OF doUndoWraper
            if (parseFloat(app.version) < 6) // "app.version < 6" if it's running under an earlier version than CS4, as earlier versions don't support "Undo" in scripts
                doUndoWrapper();
            else
                app.doScript(doUndoWrapper, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, scriptName);
            //< END OF doUnoWraper
    function doUndoWrapper() // this is the wraper function UNDO everything script made  by single undo
    {// START OF doUndoWrapper
    defaultGREPexpression = "(?i)^[a-z0-9 _-]+\\.\\w{2,4}$"; // Paragraph that starts with upper or lower case latin character, digits, spaces, hyphen or underscore, and ends with .extension
    var myFilteredFiles;
    var myExtensions = []; // initialize array
    myExtensions.push(".jpg", ".jpeg", ".png", ".gif"); // raster images
    myExtensions.push(".psd", ".tif", ".tiff", ".pdf"); // raster images (layered)
    myExtensions.push(".ai", ".eps", ".svg", ".cdr"); // vector graphics
    myExtensions.push(".mp3"); // audio files
    myExtensions.push(".mp4"); // video files
    myExtensions.push(".swf"); // flash files
    myExtensions.push(".doc", ".docx", ".rtf", ".txt"); // text documents
    myExtensions.push(".xls", ".xlsx"); // table documents 
    //Display the folder browser.
    if(app.activeDocument.saved) // our document was saved before - we suggest to start search for source folder from were InDesign file saved
        var myFolder =  Folder(app.activeDocument.filePath).selectDlg("Select the source folder with files for placing", "");
    else // file was not saved before, so we don't know where to search > suggest to start from Desktop
        var myFolder = Folder.selectDialog("Select the source folder with files for placing", "");
    if(myFolder) // if folder was selected
        //Get the path to the folder containing the files you want to place.
        var files = new Object(); // This will assoc array with FILE_NAME => FILE_EXTENSION
        if(File.fs == "Macintosh")
            myFilteredFiles = myMacOSFileFilter(myFolder);
        else
            myFilteredFiles = myWinOSFileFilter(myFolder);
        if(myFilteredFiles.length != 0) // success: we have found supported files to place
            for(i = 0; i < myFilteredFiles.length; i++)
                var filename = myFilteredFiles[i].fsName.toString().replace(/^.*[\\\/]/, ""); // now we get only file names with extenstions
                var file = [];
                file = filename.split("."); // separate file name from file extension         
                files[file[0]] = file[1]; // write FILE_NAME => FILE_EXTENSION as assoc array
        else // error: There is no supported files for placing in specified folder
            Alert("ERROR: There is no supported files for placing in specified folder.");
            exit();
    else // ERROR: we have not choose source folder
        Alert("Folder with source files was not specified"); exit();
    //Windows version of the file filter.
    function myWinOSFileFilter(myFolder)
      var myFiles = new Array;
      var myFilteredFiles = new Array;
      for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++)
            myExtension = myExtensions[myExtensionCounter];
            myFiles = myFolder.getFiles("*"+ myExtension);
      if(myFiles.length != 0)
                for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++)
      myFilteredFiles.push(myFiles[myFileCounter]);
      return myFilteredFiles;
    function myMacOSFileFilter(myFolder)
      var myFilteredFiles = myFolder.getFiles(myFileFilter);
      return myFilteredFiles;
    //Mac OS version of file filter
    //Have to provide a separate version because not all Mac OS users use file extensions and/or file extensions are sometimes hidden by the Finder.
    function myFileFilter(myFile)
        var myFileType = myFile.type;
        switch (myFileType)
            case "JPEG":
            case "EPSF":
            case "PICT":
            case "TIFF":
            case "8BPS":
            case "GIFf":
            case "PDF ":
                return true;
                break;
            default:
            for(var myCounter = 0; myCounter<myExtensions.length; myCounter++)
                var myExtension = myExtensions[myCounter];
                if(myFile.name.indexOf(myExtension)>-1)
                    return true;
                    break;
      return false;
    //> START OF GREP expression dialog
    w = new Window ("dialog", scriptName+": specify expression", undefined, {closeButton: true});
    w.preferredSize = [300,75]; // window width and height
    w.margins = 15; // window margins
    w.orientation = "column";
    w.alignChildren = ["left", "top"];
    panel = w.add("panel", undefined, "Find what: (GREP expression)");
    if(app.findGrepPreferences.findWhat != "")
        grepExpression = app.findGrepPreferences.findWhat;
        clearFindWhat = false;
    else
        grepExpression = defaultGREPexpression; // use default GREP expression
        //fgrepExpression = "\\[.+\\]"; // \\< means "begining of the world", and \\> means end of the world;
        clearFindWhat = true;
    var grepExpression = panel.add ("edittext", [0,0,270,20], grepExpression);
    grepExpression.active = true;
    panel.add("statictext", undefined, "GREP expression no need for for double \\\\ escaping");
    ok = w.add ("button", [0,0,96,20], "Continue", {name: "Ok"});
    ok.alignment = ["right", "bottom"];
    ok.onClick = function()
        findWhat = grepExpression.text; 
        w.hide();
    w.show();
    //< END OF GREP expression dialog
    if(typeof findWhat !== "undefined") // check we have not left GREP expression field empy
        app.findGrepPreferences.findWhat = findWhat; // our GREP that search for image placeholder text;
        found = app.activeDocument.findGrep();
        for(i=0; i < found.length; i++)
            if(found[i].contents.indexOf(".") > -1) // we wroking with file name with extension
                foundElem = new File (myFolder + "/" + found[i].contents);
            else // we work with file name only, so we need to add file extension manually
                found[i].contents = found[i].contents.replace(/[^a-z0-9 _-]/gi, ""); // remove all unwanted characters from file name: only letters, numbers, spcaces, minus and underscores allowed     
                foundElem = new File (myFolder + "/" + found[i].contents + "." +  files[found[i].contents]);     
          try
                placedObj = found[i].place(foundElem)[0].parent; // THANKS TO: Jump_Over for help @ https://forums.adobe.com/message/6912489#6912489
                placedObj.anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
                placedObj.anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
                placedObj.frameFittingOptions.autoFit = true;
                placedObj.frameFittingOptions.fittingOnEmptyFrame = EmptyFrameFittingOptions.FILL_PROPORTIONALLY;
                placedObj.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR;         
            catch(e)
                Alert(e);         
        app.changeGrepPreferences.changeTo = "";
        app.activeDocument.changeGrep();
        if(clearFindWhat) // clearing only if typed GREP expression manually
            app.findGrepPreferences = app.changeGrepPreferences = null; // clear Find/Change preferences once we finished
    else
        Alert("Find what GREP expression was not specified"); exit();
    }// END OF doUndoWrapper
    Top part with Windows/Mac filtering was copy-pasted from default InDeign script "ImageCatalog.jsx" as example and modified - I'm not sure if all this stuff is needed, I haven't test if it works the same without those filtering on both OS - if that's not needed - then thanks for tip!
    PS: in your findWhat \l{3,4} will not catch .ai files
    and what means .source at the end? is that doing necessary escaping, so with it it's posible to write \l instead of \\l

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

  • Choose From List Condition

    Dear Experts,
    i want to select Items in Sales Quotation Screen  which is from Particular Group, I'm using following code
    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And pVal.BeforeAction = True Then
                If pVal.FormTye = "149" And pVal.ItemUID = "38" And (pVal.ColUID = "1" Or pVal.ColUID = "3") Then
                    Try
                        oForm = SBO_Application.Forms.ActiveForm
                        Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent = pVal
                        Dim sCFL_ID As String = oCFLEvento.ChooseFromListUID
                        Dim oCFL As SAPbouiCOM.ChooseFromList = Nothing
                        oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
                        oCons = Nothing
                        oCon = Nothing
                        oCons = oCFL.GetConditions()
                        oCon = oCons.Add()
                        oCon.Alias = "ItmsGrpCod"
                        oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                        oCon.CondVal = "100"
                        oCFL.SetConditions(oCons)
                    Catch ex As Exception
                        SBO_Application.MessageBox(ex.Message)
                    End Try
                End If
            End If
    First time  Its working fine. but i'm selecting the next time in next row or same row its not showing any item. it opens only empty Choose from list. what is the prblm
    Mathi

    The problem is that when this event is called again, the Conditions object still has the conditions from the last call :
    oConditions = oCFL.GetConditions();  // this has all the previous set conditions
    So the conditions set before are also taken into consideration. What you need to do is :
    oCFL.SetConditions(null);
    oConditions = oCFL.GetConditions();
    This way the Conditions object will be empty. There is no method to remove a Condition from a Conditions collection, so you have to make it null.

  • Choose from List for UDT

    I have made a UDT
    and I want to create a choose From List  of that table
    I know how to create choose frm list  for system tables
    like making Business partner  choose from list
    but I'm not able to make choose frm list for UDT
    please someone answer my question

    HI Riya,
    You can link a CFL to a User Defined Object but not a plain User Defined Table. A full list of options can be found in the UI help under BoLinkedObject Enumeration.
    Thanks,
    Lisa
    SAP Business One Forums

Maybe you are looking for

  • Can't get movies not to Autoplay

    I have created a page with a load of Quicktime movies with poster frames using iWeb, but they all start loading immediately in Safari. I have checked the "autoplay" flags in the js file and they are set to false. What's going on? Many thanks iWeb 3.0

  • Convert one file many chapters to many files one 'book' easily??

    Hello, I work for a charity that publishes books, we've just converted 3 of our books in to Ebooks. We are used to working with all the text/chapters etc in one big file but had to split this into different files for each chapter in order for the ebo

  • Despatch serial number Interval not found Number object J_1IINTPR2

    Hi all, I am facing one error when creating excise invoice. system shows the following error. Error in allocating Despatch serial number Interval not found Number object J_1IINTPR2 For this, i tried to maintain number range in j1i9 object J_1IINTPR2.

  • Adobe reader 32 bits

    HI, I use Win XP 32 bits.  What adobe software can I use (and where can I downloan it?) to generate .pdf files? And is there a way to shrink the files that are over 25 Mb without loosing quality?

  • Can Time Machine Backup an 10.5.2 advanced server?

    Can I use Time Machine to backup my 10.5.2 server. I know I can backup clients to the server, can I also backup the server itself to an external drive? Greg