Creating a folder based on registation info?

I'm creating a user and want to add a feature where when their account is created, automatically a subfolder with their username is created and they are assigned that folder (for viewing images), any ideas on how I would do this in ADDT? I know how to display it once I get this done, but creating the folder (server side) is what I am stumped on. Thanks. -Aaron

Hi Aaron,
here´s a quick´n dirty function
(in fact a Custom AFTER Trigger) I´m using to create a directory after inserting a new record:
mkdir ("../../user_directories/".KT_escapeForSql($tNG->getPrimaryKeyValue(),$tNG->getColumnType ($tNG->getPrimaryKey()))."", 0755);
This sample code will actually create a directory (plus give it a 755 permission) that´s named according to the newly inserted record´s Primary Key rather than the user name.
You could also use $tNG->getColumnValue() to set it to the user´s name, but I personally strongly prefer the "Primary Key" method, as this value will never change, but user names might possibly -- and for retrieving the current user´s "my directory" in whatever page, you´d simply have to use the Session variable kt_login_id.
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver

Similar Messages

  • OutLook 2007 Macro to create Folder Based on Received Date

    Dear All,
    Is it possible to create a macro which will automatically create a folder based on Received Date of the mail and then group these mails (in folders) based on the received month….
    Can someone help me with the VBA Coding for Outlook 2007, where I select a folder and the macro creates folder’s and subfolder based on the received month and date-wise folder (based on the received date of the mail).
    Thanks...

    Yes, it is possible, but why would you want to split up your emails like that?
    Note that you can also do a simply search query to find all emails received within a certain month. For instance, when you want to see all emails which you received in July 2013 type the following in the Search Field:
    received:(July 2013)
    For more information about using Search within Outlook see:
    http://www.howto-outlook.com/howto/searchcommands.htm
    Robert Sparnaaij
    [MVP-Outlook]
    Outlook guides and more: HowTo-Outlook.com
    Outlook Quick Tips: MSOutlook.info

  • Need help creating a folder action for creating folders based on filenames.

    I want to create a folder action that will monitor a folder and every time a file is added to the folder it will create a directory using the filename (minus the extension) and move the file the that directory

    on run {input, parameters} -- create folders from file names and move
      set output to {} -- this will be a list of the moved files
      repeat with anItem in the input -- step through each item in the input
        set {theContainer, theName, theExtension} to (getTheNames from anItem)
        try
          set destination to (makeNewFolder for theName at theContainer)
          tell application "Finder"
            move anItem to destination
            set the end of the output to the result as alias -- success
          end tell
        on error errorMessage -- duplicate name, permissions, etc
          log errorMessage
          # handle errors if desired - just skip for now
        end try
      end repeat
      return the output -- pass on the results to following actions
    end run
    to getTheNames from someItem -- get a container, name, and extension from a file item
      tell application "System Events" to tell disk item (someItem as text)
        set theContainer to the path of the container
        set {theName, theExtension} to {name, name extension}
      end tell
      if theExtension is not "" then
        set theName to text 1 thru -((count theExtension) + 2) of theName -- just the name part
        set theExtension to "." & theExtension
      end if
      return {theContainer, theName, theExtension}
    end getTheNames
    to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
      set theParent to theParent as text
      if theParent begins with "/" then set theParent to theParent as POSIX file as text
      try
        return (theParent & theChild) as alias
      on error errorMessage -- no folder
        log errorMessage
        tell application "Finder" to make new folder at theParent with properties {name:theChild}
        return the result as alias
      end try
    end makeNewFolder
    This script almost does what I need except for the fact that it screws up on files with periods in them
    for example
    1.2.3.4.txt
    will create the directorys 1, 2, 3, and 4 instead of 1.2.3.4

  • Group Policy Logon Script to create folder based on username, run as admin

    Hello,
    I'm at a loss as to how to make this work.  I wrote the following PowerShell script that will check to see if the currently logged in user has a folder on a share, and if not it will create the folder and set appropriate permissions.  I want to
    run it as a Group Policy Logon Script, however I need to run this script as an administrator because users don't have any write/create access at the folder level of the file share.  The problem with that then becomes $ENV:Username resolves to the admin
    account the script is running under.
    Any ideas?
    Thanks!
    Ryan
    # Declare Variables
    $strName = $env:USERNAME
    $strDomain = $env:USERDOMAIN
    If ($strDomain -eq "domain.org") {
    # Split Username into 2 variables
    $data = $strName.Split("_")
    $fname = $data[0]
    $lname = $data[1]
    #Find first character of last name
    $firstcharacter = $lname[0]
    # Figure out if last name begins with A-M or N-Z
    $A_M=$firstcharacter -match "[a-m]"
    $N_Z=$firstcharacter -match "[n-z]"
    # Checks to see if folder exists
    If ($A_M -eq $true){$FolderExists = Test-Path "\\staff-files\staff\Last Name A-M\$strName"}
    elseif ($N_Z -eq $true){$FolderExists = Test-Path "\\staff-files\staff\Last Name N-Z\$strName"}
    # Creates folder if it doesn't exist
    If (($FolderExists -eq $false) -and ($A_M -eq $true)){
    New-Item "\\staff-files.domain.org\Staff\Last Name A-M\$strName" -type directory
    $DirPath = "\\staff-files.domain.org\Staff\Last Name A-M\$strName"
    elseif (($FolderExists -eq $false) -and ($N_Z -eq $true)){
    New-Item "\\staff-files.domain.org\Staff\Last Name N-Z\$strName" -type directory
    $DirPath = "\\staff-files.domain.org\Staff\Last Name N-Z\$strName"
    ElseIf ($strDomain -eq "students.domain.org") {
    # Pull 2 digit year from username and make 4 digit year
    $4digityear = "20" + $strName.Substring(0,2)
    # Checks to see if folder exists
    $FolderExists = Test-Path "\\files.domain.org\students\$4digityear\$strName"
    # Creates folder if it doesn't exist
    If ($FolderExists -eq $false) {
    New-Item "\\files.domain.org\students\$4digityear\$strName" -type directory
    $DirPath = "\\files.domain.org\students\$4digityear\$strName"
    # Assign Permissions
    If ($FolderExists -eq $false){
    $target = $DirPath
    $acl = Get-Acl $target
    $inherit = [system.security.accesscontrol.InheritanceFlags]"ContainerInherit, ObjectInherit"
    $propagation = [system.security.accesscontrol.PropagationFlags]"None"
    $accessrule = new-object system.security.AccessControl.FileSystemAccessRule ("CREATOR OWNER","Modify",$inherit,$propagation,"Allow")
    $acl.AddAccessRule($accessrule)
    $accessrule = new-object system.security.AccessControl.FileSystemAccessRule ("NT AUTHORITY\SYSTEM","FullControl",$inherit,$propagation,"Allow")
    $acl.AddAccessRule($accessrule)
    $accessrule = new-object system.security.AccessControl.FileSystemAccessRule ("administrators","FullControl",$inherit,$propagation,"Allow")
    $acl.AddAccessRule($accessrule)
    If ($strDomain -eq "students.hempfieldsd.org"){
    $accessrule = new-object system.security.AccessControl.FileSystemAccessRule ("DOMAIN\Domain Users","Modify",$inherit,$propagation,"Allow")
    $acl.AddAccessRule($accessrule)
    $accessrule = new-object system.security.AccessControl.FileSystemAccessRule ("DOMAIN\Staff_Tech","FullControl",$inherit,$propagation,"Allow")
    $acl.AddAccessRule($accessrule)
    $accessrule = new-object system.security.AccessControl.FileSystemAccessRule ("DOMAIN\Enterprise Admins","FullControl",$inherit,$propagation,"Allow")
    $acl.AddAccessRule($accessrule)
    $accessrule = new-object system.security.AccessControl.FileSystemAccessRule ($strName,"FullControl",$inherit,$propagation,"Allow")
    $acl.AddAccessRule($accessrule)
    $acl.SetAccessRuleProtection($true,$false)
    $acl.SetOwner([System.Security.Principal.NTAccount]$strName)
    Set-Acl -AclObject $acl $target
    Ryan Breneman - Systems Administrator - Hempfield School District

    Thanks jrv.  That is kind of what I thought but wasn't sure.  I think I will attack this a different way and modify the script to run through all the AD accounts and check for folder existence and create if needed.  Perhaps I'll play
    with System Center Orchestrator and run it inside there.
    These folders aren't being used for profile storage, and we already have folder redirection pointing to them, however I don't want a user to login to citrix and not have anywhere to save if they didn't have a folder to redirect to.
    Folders are supposed to be created when the staff member/student AD account is created, but it doesn't always happen.
    Thanks for your help!
    Ryan Breneman - Systems Administrator - Hempfield School District

  • Automate Creation of Folder based on Filename

    Hi,
    I am a total newbie to Automator, and although I have some programming background, I have not wrapped my brain around how this wonderful tool works yet. I need to perform a task on several hundred files and I need to do it soon, so no time to learn and play with Automator right now.
    I was wondering if someone can give me a true step by step instructions for creating a script that will do the following:
    This is how I would like the flow to behave:
    1. I select a file and run the script (hopefully based on a keystroke). The script will then:
    2. Create a new folder in the same directory as the file.
    3. Name the new folder based on the filename (minus the extension) of the above selected file.
    4. Move the selected file into the new folder.
    So basically I am enveloping the selected file in a new folder that is named the same as the file itself (minus the extension).
    Thank you in advance.

    OK, I reworked and tested it, so I think I've got all the oddities found. I wound up just using an AppleScript, since about the only thing Automator was used for was getting Finder Items (and it didn't do so well at that). Paste the script into the Script Editor and save it as an application (make sure the Startup Screen option is unchecked). You can either drop items on it or double-click it, in which case it will prompt for items. Document files are the only things processed, and packages/bundles are handled correctly (getting subfolders will not go into them), so you don't have to worry about things like application bundles and .rtfd files.
    <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: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    -- make new folders with the name of document files, then move them into their respective new folders
    -- the following properties affect the operation of the script
    property GetFiles : false -- get individual files?  true chooses files, false chooses folders
    property GetSubFolders : true -- get contents of subfolders?  true gets contents of subfolders, false skips them
    property DestinationFolder : "" -- if a folder path is specified, it is used as the destination for file moves
    on run -- application double-clicked
    if GetFiles then
    choose file with prompt "Choose a file:" default location (path to desktop) with multiple selections allowed without invisibles
    else
    choose folder with prompt "Choose a folder:" default location (path to desktop) with multiple selections allowed without invisibles
    end if
    open the result
    end run
    on open TheItems -- items dropped onto the application
    if DestinationFolder is not missing value then try -- verify destination path
    DestinationFolder as alias
    on error
    set DestinationFolder to (choose folder with prompt "Invalid destination folder path - where do you want to move the items?")
    end try
    set SkippedItems to {} -- this will be a list of skipped items (errors)
    set TheFiles to {} -- this will be a list of items to process
    repeat with AnItem in TheItems -- expand folders
    set AnItem to the contents of AnItem
    set FileInfo to (info for AnItem)
    if (folder of FileInfo) and not (package folder of FileInfo) then -- a folder
    if GetSubFolders then
    repeat with SubItem in (ListFiles from AnItem)
    set the end of TheFiles to (contents of SubItem)
    end repeat
    else
    tell application "Finder" to (get files of AnItem) as alias list
    set TheFiles to TheFiles & the result
    end if
    else
    set the end of TheFiles to AnItem
    end if
    end repeat
    repeat with MyFile in TheFiles -- do stuff with the resulting items
    set {TheClass, TheName, TheExtension, TheContainer} to (GetTheNames from MyFile)
    if TheClass is «class docf» then try -- just document files
    tell application "Finder"
    if DestinationFolder is not missing value then
    make new folder at DestinationFolder with properties {name:TheName}
    else
    make new folder at TheContainer with properties {name:TheName}
    end if
    move MyFile to the result
    end tell
    on error ErrorMessage -- the folder already exists, permissions, etc
    log ErrorMessage
    set the end of SkippedItems to (TheName & TheExtension)
    -- set the end of SkippedItems to (AnItem as text) -- the full file path
    end try
    end repeat
    if SkippedItems is not {} then -- handle skipped items
    set AlertText to "Error with moving files to folders"
    if (count SkippedItems) is greater than 1 then
    set TheMessage to ((count SkippedItems) as text) & space & "items were skipped:"
    else
    set TheMessage to "1 " & "item was skipped:"
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SkippedItems, AppleScript's text item delimiters} to {SkippedItems as text, TempTID}
    display alert AlertText message TheMessage & return & SkippedItems
    end if
    end open
    to GetTheNames from SomeFile
    get a class, name, extension, and container from a file path
    parameters - SomeFile [mixed]: a file path
    returns [list] - item 1 [constant]: the class of the file object
    item 2 [text]: the name of the file
            item 3 [text]: the .extension (if no extension, the value returned is "")
    item 4 [alias]: the containing folder of the file
    set SomeFile to SomeFile as alias -- the Finder likes aliases
    tell application "Finder"
    set TheClass to class of (get properties of SomeFile)
    set TheName to name of SomeFile
    set TheExtension to name extension of SomeFile
    if TheExtension is in {missing value, ""} then
    set TheExtension to ""
    else
    set TheExtension to "." & TheExtension
    end if
    set TheName to text 1 thru -((count TheExtension) + 1) of TheName -- just the name part
    set TheContainer to (container of SomeFile) as alias
    end tell
    return {TheClass, TheName, TheExtension, TheContainer}
    end GetTheNames
    to ListFiles from SomeItem
    return a list of files contained in SomeItem, drilling down into subfolders (not packages)
    parameters - SomeItem [mixed]: the item to get the contents of
      returns [list]: a list of aliases
    set {FilesList, SomeItem} to {{}, SomeItem as text}
    set FileInfo to (info for SomeItem as alias)
    if (folder of FileInfo) and not (package folder of FileInfo) then -- a folder
    try
    tell application "Finder" to set SubItems to (items of folder SomeItem)
    on error
    return {}
    end try
    repeat with AnItem in SubItems -- drill down
    set FilesList to FilesList & (ListFiles from AnItem)
    end repeat
    else
    set the end of FilesList to (SomeItem as alias)
    end if
    return FilesList
    end ListFiles
    </pre>

  • How to create a report based on a DataSet programatically

    I'm working on a CR 2008 Add-in.
    Usage of this add-in is: Let the user choose from a list of predefined datasets, and create a totally empty report with this dataset attached to is. So the user can create a report based on this dataset.
    I have a dataset in memory, and want to create a new report in cr2008.
    The new report is a blank report (with no connection information).
    If I set the ReportDocument.SetDataSource(Dataset dataSet) property, I get the error:
    The report has no tables.
    So I must programmatically define the table definition in my blank report.
    I found the following article: https://boc.sdn.sap.com/node/869, and came up with something like this:
    internal class NewReportWorker : Worker
          public NewReportWorker(string reportFileName)
             : base(reportFileName)
    public override void Process()
             DatabaseController databaseController = ClientDoc.DatabaseController;
             Table table = new Table();
             string tabelName = "Table140";
             table.Name = tabelName;
             table.Alias = tabelName;
             table.QualifiedName = tabelName;
             table.Description = tabelName;
             var fields = new Fields();
             var dbField = new DBField();
             var fieldName = "ID";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             dbField = new DBField();
             fieldName = "IDLEGITIMATIEBEWIJS";
             dbField.Description = fieldName;
             dbField.HeadingText = fieldName;
             dbField.Name = fieldName;
             dbField.Type = CrFieldValueTypeEnum.crFieldValueTypeInt64sField;
             fields.Add(dbField);
             // More code for more tables to add.
             table.DataFields = fields;
             //CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo info =
             //   new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
             //info.Attributes.Add("Databse DLL", "xxx.dll");
             //table.ConnectionInfo = info;
             // Here an error occurs.
             databaseController.AddTable(table, null);
             ReportDoc.SetDataSource( [MyFilledDataSet] );
             //object path = @"d:\logfiles\";
             //ClientDoc.SaveAs("test.rpt", ref path, 0);
    The object ClientDoc referes to a ISCDReportClientDocument in a base class:
       internal abstract class Worker
          private ReportDocument _ReportDoc;
          private ISCDReportClientDocument _ClientDoc;
          private string _ReportFileName;
          public Worker(string reportFileName)
             _ReportFileName = reportFileName;
             _ReportDoc = new ReportDocument();
             // Load the report from file path passed by the designer.
             _ReportDoc.Load(reportFileName);
             // Create a RAS Document through In-Proc RAS through the RPTDoc.
             _ClientDoc = _ReportDoc.ReportClientDocument;
          public string ReportFileName
             get
                return _ReportFileName;
          public ReportDocument ReportDoc
             get
                return _ReportDoc;
          public ISCDReportClientDocument ClientDoc
             get
                return _ClientDoc;
    But I get an "Unspecified error" on the line databaseController.AddTable(table, null);
    What am i doing wrong? Or is there another way to create a new report based on a DataSet in C# code?

    Hi,
    Have a look at the snippet code below written for version 9 that you might accommodate to CR 2008, it demonstrates how to create a report based on a DataSet programmatically.
    //=========================================================================
    +           * the following two string values can be modified to reflect your system+
    +          ************************************************************************************************/+
    +          string mdb_path = "C:
    program files
    crystal decisions
    crystal reports 9
    samples
    en
    databases
    xtreme.mdb";    // path to xtreme.mdb file+
    +          string xsd_path = "C:
    Crystal
    rasnet
    ras9_csharp_win_datasetreport
    customer.xsd";  // path to customer schema file+
    +          // Dataset+
    +          OleDbConnection m_connection;                         // ado.net connection+
    +          OleDbDataAdapter m_adapter;                              // ado.net adapter+
    +          System.Data.DataSet m_dataset;                         // ado.net dataset+
    +          // CR variables+
    +          ReportClientDocument m_crReportDocument;          // report client document+
    +          Field m_crFieldCustomer;+
    +          Field m_crFieldCountry;+
    +          void CreateData()+
    +          {+
    +               // Create OLEDB connection+
    +               m_connection = new OleDbConnection();+
    +               m_connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdb_path;+
    +               // Create Data Adapter+
    +               m_adapter = new OleDbDataAdapter("select * from Customer where Country='Canada'", m_connection);+
    +               // create dataset and fill+
    +               m_dataset = new System.Data.DataSet();+
    +               m_adapter.Fill(m_dataset, "Customer");+
    +               // create a schema file+
    +               m_dataset.WriteXmlSchema(xsd_path);+
    +          }+
    +          // Adds a DataSource using dataset. Since this does not require intermediate schema file, this method+
    +          // will work in a distributed environment where you have IIS box on server A and RAS Server on server B.+
    +          void AddDataSourceUsingDataSet(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               // add a datasource+
    +               DataSetConverter.AddDataSource(rcDoc, data);+
    +          }+
    +          // Adds a DataSource using a physical schema file. This method require you to have schema file in RAS Server+
    +          // box (NOT ON SDK BOX). In distributed environment where you have IIS on server A and RAS on server B,+
    +          // and you execute CreateData above, schema file is created in IIS box, and this method will fail, because+
    +          // RAS server cannot see that schema file on its local machine. In such environment, you must use method+
    +          // above.+
    +          void AddDataSourceUsingSchemaFile(+
    +               ReportClientDocument rcDoc,          // report client document+
    +               string schema_file_name,          // xml schema file location+
    +               string table_name,                    // table to be added+
    +               System.Data.DataSet data)          // dataset+
    +          {+
    +               PropertyBag crLogonInfo;               // logon info+
    +               PropertyBag crAttributes;               // logon attributes+
    +               ConnectionInfo crConnectionInfo;     // connection info+
    +               CrystalDecisions.ReportAppServer.DataDefModel.Table crTable;+
    +               // database table+
    +               // create logon property+
    +               crLogonInfo = new PropertyBag();+
    +               crLogonInfo["XML File Path"] = schema_file_name;+
    +               // create logon attributes+
    +               crAttributes = new PropertyBag();+
    +               crAttributes["Database DLL"] = "crdb_adoplus.dll";+
    +               crAttributes["QE_DatabaseType"] = "ADO.NET (XML)";+
    +               crAttributes["QE_ServerDescription"] = "NewDataSet";+
    +               crAttributes["QE_SQLDB"] = true;+
    +               crAttributes["QE_LogonProperties"] = crLogonInfo;+
    +               // create connection info+
    +               crConnectionInfo = new ConnectionInfo();+
    +               crConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;+
    +               crConnectionInfo.Attributes = crAttributes;+
    +               // create a table+
    +               crTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();+
    +               crTable.ConnectionInfo = crConnectionInfo;+
    +               crTable.Name = table_name;+
    +               crTable.Alias = table_name;+
    +               // add a table+
    +               rcDoc.DatabaseController.AddTable(crTable, null);+
    +               // pass dataset+
    +               rcDoc.DatabaseController.SetDataSource(DataSetConverter.Convert(data), table_name, table_name);+
    +          }+
    +          void CreateReport()+
    +          {+
    +               int iField;+
    +               // create ado.net dataset+
    +               CreateData();+
    +               // create report client document+
    +               m_crReportDocument = new ReportClientDocument();+
    +               m_crReportDocument.ReportAppServer = "127.0.0.1";+
    +               // new report document+
    +               m_crReportDocument.New();+
    +               // add a datasource using a schema file+
    +               // note that if you have distributed environment, you should use AddDataSourceUsingDataSet method instead.+
    +               // for more information, refer to comments on these methods.+
    +               AddDataSourceUsingSchemaFile(m_crReportDocument, xsd_path, "Customer", m_dataset);+
    +                              +
    +               // get Customer Name and Country fields+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Customer Name", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCustomer = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               iField = m_crReportDocument.Database.Tables[0].DataFields.Find("Country", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault);+
    +               m_crFieldCountry = (Field)m_crReportDocument.Database.Tables[0].DataFields[iField];+
    +               // add Customer Name and Country fields+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCustomer);+
    +               m_crReportDocument.DataDefController.ResultFieldController.Add(-1, m_crFieldCountry);+
    +               // view report+
    +               crystalReportViewer1.ReportSource = m_crReportDocument;+
    +          }+
    +          public Form1()+
    +          {+
    +               //+
    +               // Required for Windows Form Designer support+
    +               //+
    +               InitializeComponent();+
    +               // Create Report+
    +               CreateReport();+
    +               //+
    +               // TODO: Add any constructor code after InitializeComponent call+
    +               //+
    +          }+//=========================================================================

  • How to create a condition based on a select that retrieve dynamically a LOV

    Hi all, I need to create a condition based on a select that retrieve dynamically a LOV.
    So, the condition have to be:
    inventory_item_id NOT IN (SELECT inventory_item_id FROM apps.mtl_system_items_kfv WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV')
    I need to create a LOV based on this select without making any join with the folder which contains the field inventory_item_id, because otherwise I have the contradiction:
    and o124757.INVENTORY_ITEM_ID = o118741.INVENTORY_ITEM_ID -- join between the main custom folder (o118741) and the LOV custom folder (o124757)
    and o118741.INVENTORY_ITEM_ID NOT IN (o124757.INVENTORY_ITEM_ID) -- condition
    These two condition together don't show any data, obviously....This means also, that I can't use a calculated field, because if I want to see this field, I have to create a join, another time, with the main custom folder.
    I tried to create a LOV on the Administrator, but when I create the condition I have to check manually the values....and if in the future this LOV will increase I need every time to re-check all the values.....instead I need that the inventory_item_id have to be NOT IN dinamically in the list of values retrieved by the select.
    Anybody has inplemented something similar ??
    Thanks in advance
    Alex

    Hi alex,
    SELECT incidents.INVENTORY_ITEM_ID,
    pcodes.PROBLEM_NAME
    FROM apps.cs_incidents_all_b incidents,apps.jtf_rs_problem_codes_v pcodes
    WHERE incidents.category_id IN (SELECT category_id
    FROM mtl_categories_kfv
    WHERE concatenated_segments = 'IPTV')
    AND incidents.PROBLEM_CODE = pcodes.PROBLEM_CODE
    where incidents.INVENTORY_ITEM_ID NOT IN SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    You want to add this condition to the first query it holds good for this scenerio.All the items which are NOT IN will be retrieved.Here you are selecting other than "General_faults_iptv"
    But again your trying to select in the second query where you want "General_faults_iptv"
    SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    If you carefully go through what your doing,you will understand.In the above explantion ,there will be no records generated.First query your saying NOT IN and again your saying for the same IN,how will records retrieve its meaningless.
    I dont know what you want to get from second query.I would suggest you to do is dont use the second query and just use the first query and you will get.Here is the query and this will give you result.
    SELECT incidents.INVENTORY_ITEM_ID,
    pcodes.PROBLEM_NAME
    FROM apps.cs_incidents_all_b incidents,apps.jtf_rs_problem_codes_v pcodes
    WHERE incidents.category_id IN (SELECT category_id
    FROM mtl_categories_kfv
    WHERE concatenated_segments = 'IPTV')
    AND incidents.PROBLEM_CODE = pcodes.PROBLEM_CODE
    AND incidents.INVENTORY_ITEM_ID NOT IN SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    Regards,
    Kranthi.

  • How to create the folder in LabVIEW 7.1?

    Dear All,
                I need to create the folder in LabVIEW 7.1?.. Then if the folder exsists i need to ceate the new folder with the file name by increate by nemerical number by 1. As well as i need write the data's which i acquired in sepeate test file within that folder itseif. If the file name already exsists i need to create the same file name by increatemet by one in numerical no 1. Any one help to solve this issue?
    Regards,
    Srinivasan.P

    You've asked this question before, and so far have shown nothing to indicate that you've made any attempt to solve the problem by using the tools available to you. Like the functions palette. Or the search tool, since this question has been asked many times before.
    Have you looked in the File I/O palette? There's the New Directory function for creating directories. There the File/Directory Info function that can be used to check if the folder exists (call the function, and if you get error 7 you know the folder doesn't exist). You can also use List Directory on the parent directory.
    Make an effort.

  • How to create universe folder in BO XI via SDK

    Hi all,
    I'm just starting to use the BOXI SDK. I've used the sample to create new folders, it worked perfectly.
    But now I would like to create new universe folders but I have no idea how to do it. Here is the sample to create a folder :
    int addFolder (int parentFolderID, String folderName, String folderDescription, IInfoStore infoStore)
        int objectID = 0;
        try
         * Since folders are implemented using a plugin,
         * you will need the PluginManager to retrieve the folder plugin.
        IPluginMgr pluginMgr = infoStore.getPluginMgr();
         * Retrieve the Folder plugin by passing the plugin ProgID
         * to the PluginInfo property of the PluginManager.
        //IPluginInfo folderPlugin = pluginMgr.getPluginInfo("CrystalEnterprise.Folder");
        IPluginInfo folderPlugin = pluginMgr.getPluginInfo("CrystalEnterprise.Folder");
        // Create a new, empty InfoObject collection.
        IInfoObjects newInfoObjects = infoStore.newInfoObjectCollection();
         * Give the Folder plugin object to the Add method.  This
         * creates a new InfoObject based on the plugin type.
         * In this case, since the plugin is the folder plugin,
         * the object created is a folder object.
        newInfoObjects.add(folderPlugin);
           IInfoObject infoObject = (IInfoObject) newInfoObjects.get(0);
        // Specify the folder's details._ENDLOC   _
        infoObject.setTitle (folderName);
        infoObject.setDescription (folderDescription);
        objectID = infoObject.getID();
         * The next line indicates where in the folder tree the
         * folder is to be created.  It does this by setting the
         * parent ID property or, in other words, by telling the folder
         * which folder is its parent. If the parent ID property is
         * zero, then the folder has no parent and is thus a top-level
         * folder.
        infoObject.properties().setProperty(CePropertyID.SI_PARENTID, parentFolderID);
         * Use the infoStore to commit the new collection with the new folder
         * to the CMS database.
        infoStore.commit (newInfoObjects);
         }catch (SDKException e) {
              throw new Error("Impossible d'ajouter le dossier. Exception survenue : "
                                      + e.getMessage());
         }catch (NullPointerException e) {
              throw new Error("Impossible d'ajouter le dossier. Exception survenue : "
                                      + e.getMessage());
        return objectID;
    Could someone give me some clues or code sample (preferably in Java or C#) in order to solve this problem?
    Thank you in advance for all information and help you could provide.
    Best regards,

    I wouldn't expect the code to be any different for universe folders, you just need to find the id for the top level folder for the universes.  It might be easiest to add a folder there manually and check its properties.

  • Creating a Folder and uploading file into that folder Inside OneDrive in Office365 programmatically

    I am using this below code to create a folder inside onedrive in office365,but i cant able to access the url for accessing my personal onedrive,it causing error "Cannot connnect to the server"
     using (ClientContext clientContext = new ClientContext("https://claysys123-
    my.sharepoint.com/personal/anju_claysys123_onmicrosoft_com/Documents/Forms/All.aspx"))
                    SecureString passWord = new SecureString();
                    string currentyear = DateTime.Now.Year.ToString();
                    foreach (char c in "MyPassWord".ToCharArray()) passWord.AppendChar(c);
                    clientContext.Credentials = new SharePointOnlineCredentials("username", passWord);
                    Web web = clientContext.Web;
                    clientContext.Load(web);
                    clientContext.ExecuteQuery();
                    clientContext.Web.Folders.Add("https://claysys123.sharepoint.com/_layouts/15/start.aspx#/Shared%20Documents");
                    clientContext.ExecuteQuery();
    but whenever am executing this clientContext.Web.Folders.Add("https://claysys123.sharepoint.com/_layouts/15/start.aspx#/Shared%20Documents");
                    clientContext.ExecuteQuery(); causes Error "cannot Connect to The Server"..pls help me as soon as possible..
    please give me sample code to get rid of this problem.

    Creating folder in One drive is equivalent to communication with document library. Here are all the samples to create folder in document library.
    http://social.msdn.microsoft.com/Forums/silverlight/en-US/985bab38-7e81-498c-97d8-534e6ee4cf11/how-to-create-folders-based-on-logic-using-client-object-model-2013?forum=sharepointdevelopment
    Bala

  • Creating an invoice based on a delivery via DI API

    Hi,
    Each time a user creates a delivery (not always based on a sales order), the add on I have developed creates an invoice based on it. This happens without any issue in most cases but I am receiving the following two errors on the client site and have not been able to recreate the issue here...
    One of the base documents has already been closed  [INV1.BaseEntry][line: 1]
    Number of items drawn is greater than open quantity  , 'Item A'
    Does anyone have any idea what could be causing this?
    Thans for any help,
    Robin

    Hi Thomas,
    Thanks for teh reply but unfortunately this is not the case - for example...
    A delivery which is returning this error for Item A, has a quantity of 20 but has 7400 in stock, so it is not going into a negative quantity.
    The only way I could get this error ("Number of items drawn is greater than open quantity"), not using the add on but working within B1, was to create a delivery note, then create an invoice based on it, increase the quantity of the item on the invoice, and the error displays in B1 on the info bar at the bottom.
    I cannot see how the user can affect this, as when they are creating the Delivery, the Invoice creation is automatic (triggers on the add button after the Delivery has been successfully added), and they don't even see the Invoice form.
    Robin

  • Create a report based on sample data!

    Hello all,
    I would like to get some helps for creating a report based on the following table data in the database:
    Class     |        Name                   |         Student
    =======================================
    1            |        Algebra               |             60
    1            |        Extra Algebra      |             20
    2            |        Calculus              |             80
    2            |        Extra Calculus     |             10
    3            |        Geometry            |             90
    What I expect to have the layout of report should be look like as below:
                               School Register Report
    ClassGroup     |         Name          |    Ontime register   |    Late register   
    =========================================================
    1                      |        Algebra        |             60              |           20            
    2                      |       Calculus        |             80              |           10           
    3                      |       Geometry      |             90              |                           
    Please tell it is possible to do it in Crystal Report? Please help with solution. Thanks in advance.

    Assumimg second type always starts with Extra then, create formula
    @Name
    If like 'Extra*' then mid(, 7,20) else
    Group on this formula
    @LateReg
    If like 'Extra*' then else 0
    @OnTimeReg
    If not( like 'Extra*') then else 0
    Add Maximum smmaries of these formula to @Name Group footer, suppress details and group header
    Ian

  • Mail does not create new emails based on the highlighted mailbox, but rather the receiving mailbox of whatever individual email happens to be highlighted. This was not the case prior to Lion. Is this a bug or an error on my part?

    Mail does not create new emails based on the highlighted mailbox, but rather according the receiving mailbox of whatever individual email happens to be highlighted. This was not the case prior to Lion. Is this a bug or an error on my part? (I do have the setting for creating new emails from the highlighted mailbox checked.)

    The questions about time was not only because of thinking about the Time Machine, but also possible impact on recognizing which messages remaining on a POP server (doesn't apply to IMAP) have been already downloaded. In the Mail folder, at its root level, in Mail 3.x there is a file named MessageUidsAlreadyDownloaded3 that should prevent duplicate downloading -- some servers may not communicate the best with respect to that, and the universal index must certainly be involved in updating that index file. If it corrupts, it can inhibit proper downloading. However, setting the account up in a New User Account and having the same problem does not point that way, unless your POP3 server is very different from most.
    That universal index is also typically involved when messages are meant to be moved from the Inbox to another mailbox -- in Mail 3.x the message does not move, but rather is copied, and then erased from the origin mailbox. That requires updating the Envelope Index to keep track of where the message is, and should keep track of where it is supposed to have been removed after the "Move".
    Ernie

  • Create another BP based on an existing BP

    Hi Gurus
    For CRM 2007 I want to create a BP based on a the details of a BP selected by a user.
    How would this be done? I haven't found any useful threads on this subject.
    Thanks
    Panduranga

    Hi Panduranga,
    Stephen is very right about this - there is no way to copy a business partner.
    However, we have tried in the past to develop this functionality - and also the functionality to change the category after copying.This is some info that will help you while creating a copy program -
    1. The easiest way is to use APIs. Start by calling BUPA_CENTRAL_GET_DETAIL usign the BP number. THis will give you all the central data for the BP - e.g. name, etc. Now, merely feed the output of this module into the module BUPA_CREATE_FROM_DATA. This will create a new BP with the same data of the old BP.
    2. Now that the main BP is ready, you need to start copying the individual datasets - addresses, bank details, roles, Id, industry,etc. This is tricky - the ADD apis - BUPA_ADDRESS_ADD, BUPA_ROLE_ADD, etc can only create one record in a call. So, you need to first get the data of the reference BP using the GET_DETAIL api e.g. : BUPA_ADDRESS_GET_DETAIL, then loop at each returned record, and pass that into the correspinding ADD BAPI.
    3. Be sure to call BAPI_TRANSACTION_COMMIT at the end to commit the data to the DB.
    I hope this helps you.
    Cheers,
    Rishu.

  • Retention Policy and Managed folder based retention

    What is difference between "Retention Policy/ Policy Tags" and " Managed Content Settings"?
    In my setup , my managed folder folder become general folder after following steps
    1. Created Managed folder
    2. Created managed content settings for IPM.post and IPM.Appointment with retention action "Delete and Allow recovery".
    3. Created managed policy and applied to 1 mailbox, and this is working properly
    But After that,
    1. Created 3 retention tags(1 for inbox, 1 for sent, 1 personal).
    2. Created retention policy combining these 3 tags.
    3. Applied to SAME mailbox
    4. Ran 'ManagedFolderAssitant'
    **After this, Managed folder become general outlook folder.
    So, cant I have "Managed folder based retention for managed folders" and General retention for "Inbox,Sent"

    Exchange 2010 RTM introduced Retention Policies as the successor to the Message Records Management (MRM) technology introduced in Exchange 2007. MRM was the successor to Mailbox Manager Policies in Exchange 2003. Message Records Management is called MRM
    1.0 and Retention Policies is being called MRM 2.0 for short. MRM 1.0 as well as MRM 2.0 are both available in Exchange 2010. Only difference is we can manage Retention Policies from the EMC and EMS, but the Managed Folder Mailbox Policy is only Managed from
    the EMS through cmdlets in Exchange 2010 SP1.
    It completely depends on your requirements when to use MRM 1.0 and when to Use MRM 2.0.
     Certain new features are added in MRM 2.0 (Retention Policy) which allow us to manage our mailbox email items at very granular level. But if we are still happy with earlier version MRM 1.0 then we can continue using Managed folder mailbox
    Policy in Exchange 2010.
    [ Note: If we are Using the Retention Policy (MRM 2.0) then we can view the expiry of  each and every email items of the folders on which the retention Policy is tagged and this can be only view from OWA and Outlook 2010, But this feature
    is not available  for  Managed Folder Mailbox Policy (MRM 1.0) ]
    We cannot use the Base Folder only switch in MRM 2.0 because it is TAG  specific (DPT, RPT, and PPT) not Managed Folder specific.
    Managed folder Mailbox Policy is folder specific this would be the major difference.
    Refer to this link :
    Retention policies vs Managed folders

Maybe you are looking for

  • I can't get BOINC to work.

    Hello, following the poor explained steps at https://wiki.archlinux.org/index.php/BOINC I undestand that what I must do is this: 1º - I install BOINC with [josealb77@ArchLinux ~]$ sudo pacman -S boinc [sudo] password for josealb77: resolviendo depend

  • Inbound Idoc not getting posted

    Hi, I am facing a problem in posting an Inbound Idoc of Baisc type INVOIC02 and Message type INVOIC. The Idoc stays in status 51 and the error is "Function Code cannot be selected". I have checked the Function module, it is already assigned to the pr

  • Why do microsoft users have difficulty in opening my PDF files

    Why do some microsoft users have difficulty in opening my PDF files

  • How can i see charts for different region

    Hi guys, i want to be able to see the charts/ top singles for other regions! in particular korea and japan. How would i do this without changing my country? As the korean region is just an app store and you cant buy songs

  • JavaScript equivalent of SQL in

    Hi all, I do not know where to ask this question, but I am trying to write a javasctript for my dynamic action. Now I have to check a variable for values and I do it like this: if ($v("APEX_ITEM") == 1 && $v("APEX_ITEM")==2) { ....} In SQL I would wr