Set file name by global variable

Hi,
I am trying to load data from excel file. I have created batch job with global variable $GV_FileName. When I set a global variable value in a script inside Workflow the data load successfully. When I set a global variable value as a job property I receive the error: "The variable <$GV_FileName> of the is empty. Please initialize the variable to a valid value." But in  debug mode I see that the variable is not empty.
Thanks in advance.
Lyudmila

In the job -> properties -> Global Variables tab you set the default value. The actual value used is set when executing the job. Could it be that?

Similar Messages

  • Set file name as a variable. Then use it to name a folder

    I'm making a workflow that I want to get the selected file, then create a new folder using that file's name. I made a workflow as follows:
    Get selected Finder Item (In this case a JPG image)
    Set Value of Variable
    New Folder (dragging the variable from 'Set Value of Variable')
    But running this workflow it adds the path of the file to the new folders name, as well as the file's name (e.g. instead of the folder being called 'Photo1' it's called '/Users/Jono/Desktop/Photo1.jpg').
    Does anybody know how I could get it to just the file name (preferably without the extension) instead of prefixing it with the path?

    The New Folder action uses the specified text for the file name. The following Run AppleScript action will return just the names of the Finder Items passed to it:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters}
    get a name from a file path
    input: a list of Finder Items (aliases)
    output: a list of names
    set output to {}
    repeat with AnItem in the input -- step through each item in the input
    set {name:TheName, name extension:TheExtension} to (info for AnItem)
    if TheExtension is missing value then set TheExtension to ""
    set end of output to (text 1 thru -((count TheExtension) + 2) of TheName) -- just the name part
    end repeat
    return the output -- pass the result(s) to the next action
    end run
    </pre>

  • ODI - Setting file name from a variable

    Hi,
    I am working on a data integration where I have to fetch data from a database table
    and write it to a flat-file (Fixed length text file). I have succeeded in creating the file.
    I could connect to the database, fetch data and write it to a flat-file in the format I need.
    1. After doing this, can I rename the file or move to file to somewhere, where the filename
    is something like 'File_yyyyMMDDHHmmss.txt'?
    2. To Achieve this, can I use a variable in the ODI project?
    Please help as this is needed urgently for a delivery.
    Thanks,
    Leo

    Hi,
    Thanks for the response. I used it in the same way. But, when I validate the query, it says invalid format description. I am putting this query in the "Select query" text item in "Refreshing" tab of the variable definition screen.
    Thanks,
    Leo

  • Icon name as Global variable

    Hi,
    In my forms i can set a single static icon name for a button. Is it possible to give the icon name as global variable name to change the icon of the button dynamically by changin the value of the global variable.
    Using set_item_property i can change. But it seems tough to implement in my forms.
    Please Help!
    Balaji.M

    What's the problem with set_item_property??
    You can use the global variables to store the name of icon file to associate with the button.
    But, ultimately you'll have to use the set_item_property to reflect the changes dynamically.
    set_item_property(<block.item name>,ICON_NAME,:global.<icon file name>);
    I don't think, by just setting global variables you can get your requirement to work.
    You'll have to use set_item_property, if you want to change the icon file name dynamically.
    Please mark answer as helpful / correct, if it helps you
    Navnit

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

  • Reciever File Adapter - Temp File Name Scheme using Variable Substitution

    How can I create a temporary file that uses variable substitution? 
    We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter.  So two independent files are merging into a single file.  We are not using the "Append" setting.
    We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name. 
    Using variable substitution we created a msgid variable.  When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id.  We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.
    Any Ideas?
    Thanks,
    Matt

    HI Matthew,
    Why are you adding the message id into the temporary file??
    I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.
    Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).
    So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.
    Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.
    I hope this helps.
    Cheers
    Dhwani

  • How can i notice the name of global variable ?

    When the customizing.fmx calls the standard.fmx, I came accross an error "FRM-41067 Can not find menu Item".
    customizing.fmx --> call --> standard.fmx
    So, I want to assign a global variable to standard.fmx in the customizing.fmx.
    How can i find out the name of global variable ???
    Can I catch the name of global variable??
    For expamle..
    :global.menu_id was not the answer.
    :global.mn_id was not the answer.
    :global.mnid was not the answer.
    HOW!!!!!!!!!!!!!!!!!!!!
    Please HELP ME!!!

    Hi
    Can I catch the name of global variable?? yes u can , if u use a message after each type like...
    :global.menu_id
    MESSAGE (' global.menu_id = ' || global.menu_id );
    SYNCHRONIZE; Hope this helps...
    Regards,
    Abdetu...

  • Loading a text file into a global variable issue - really a global var?

    From all the documentation and examples I can find, it appears that it would be
    correct to create a global array variable [outside of any functions] to load image names into,
    then use these images for a slideshow. I want to make the app dynamic, in that changing the text file gives a new set of images.
    The global variable goes null [no values] after the load event listener. Why is that?
    Isn't global, well global, and alive for the duration of the SWF?
    PARAMS.TXT:
    monthNames=January,February,March,April,May,June,July,August,September,October,November,De cember&dayNames=Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
    CODE:
    var dNames:Array = new Array();
    var mNames:Array = new Array();
    var request:URLRequest = new URLRequest("images/params.txt");
    var variables:URLLoader = new URLLoader();
    variables.dataFormat = URLLoaderDataFormat.VARIABLES;
    variables.addEventListener(Event.COMPLETE, completeHandler);
    try
    variables.load(request);
    catch (error:Error)
    trace("Unable to load URL: " + error);
    trace("2 mNames 2: " + mNames[2]);
    trace("2 dNames 3: " + dNames[3]);
    stop();
    function completeHandler(event:Event):void
    var loader:URLLoader = URLLoader(event.target);
    dNames = loader.data.dayNames.split(",");
    mNames = loader.data.monthNames.split(",");
    trace(loader.data.dayNames);
    trace("1 mNames 2: " + mNames[2]);
    trace("1 dNames 3: " + dNames[3]);
    OUTPUT:
    2 mNames 2: undefined
    2 dNames 3: undefined
    Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
    1 mNames 2: March
    1 dNames 3: Wednesday
    How do I access these values after loading from the external file, after the load?
    Thanks in advance.

    The statement you quoted from whatever Adobe documentation is correct.
    If you want to load the data into the arrays before anything else happens, then have anything else that happens execute via the completeHandler function... after the data is loaded and processed into the arrays.
    the command: loadFile() executes before the trace("2:" +images[4]); command.  The loadFile function is processed and the loading process BEGINS... but starting the loading does not delay the main processing from continuing down the line--the loading itself becomes a secondary/background task.  The command was to execute the loadFile function and the processing of that function was completed.  If you don't believe so, then add a trace...
    function loadFile():void
         vars.dataFormat = URLLoaderDataFormat.VARIABLES;
         vars.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
         vars.load(new URLRequest("images/fnames.txt"));
         trace("started loading");
    If you add that trace, you should see that the loadFile function execution is completed and the next line in your code is then processed... trace(2....)
    The addEventlistener does not stop anything.  The addEventListener code is assigning a monitor, not a traffic controller... it is telling the monitor to indicate when the data has finished loading.  It is not telling anything to stop program execution.
    So if you want to wait until the data is loaded before you do anything else... it goes....
    function onComplete(evt:Event):void
         var urlVars:URLVariables = evt.target.data;
         images = vars.data.images.split(",");
         tnails = vars.data.thumbnails.split(",");
         ................HERE.................

  • Setting File Name inside ABAP mapping

    Hello All,
    We have a requirement where we need to send the IDOC in a flat file format to the destination system which we are doing inside an ABAP mapping. Now we need to set the file name depending on a particular field in the IDOC. For this we need to use the DynamicConfigurationKey class inside our ABAP mapping.
    Can anyone throw some light how to access these Adapter-Specific Attributes inside ABAP mapping?
    Thanks
    Abinash

    guess this is the one
    Re: Abap mapping and variable substitution in File adapter

  • Setting File Name in response

    Hi,
    On server side I read the (Pdf) file and then stream the file content thru response object so that this pdf file opens in browser using Adobe reader. This works just fine.
    And right now, if user wants to save this file in browser, complete jsp url appears as file name in save as dialog box.
    For eg.:
    If my jsp has stream the pdf file from this url
    http://www.xy.com/jsp/displayFileJsp?f=xyz.pdf
    then
    when user tries to save this file, browser save as dialog displays file name as "http://www.xy.com/jsp/displayFileJsp?f=xyz.pdf"
    But I want user should download that file name with specific file name like xyz.pdf.
    I tried to set the content type
    response.setHeader("Content-Disposition", " filename=xyz.pdf" );
    But it didn't work.
    any suggestions ?
    rk

    i have created a zip file and i have to make it downloadable i.e. pop-up box should be invoked. my code is
    try {    
              outFilename = "D:\\Product.zip";
              ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
              for (int i=0; i<filenames.length; i++) {
              FileInputStream in = new FileInputStream(filenames);
              out.putNextEntry(new ZipEntry(filenames[i]));
              int len;
              while ((len = in.read(buf)) > 0) {
              out.write(buf, 0, len);
              out.closeEntry();
              in.close();
              out.close();
              catch (IOException e)
                   e.printStackTrace();
              String d1file = outFilename;
              File f1 = new File (d1file);
                   response.setContentType ("text/plain");
                   response.setHeader("Content-Disposition", "attachment;filename=\"" + d1file + "\"");
              try { 
              InputStream in = new FileInputStream(f1);
              ServletOutputStream outs = response.getOutputStream();
              int bit = 256;
                   while ((bit) >= 0)
                        bit = in.read();
                        outs.write(bit);
                   outs.flush();
                   outs.close();
                   in.close();
              catch (IOException ioe)
                   ioe.printStackTrace(System.out);
    it is creating zip file and placing it at D:\\ . I want to invoke download "Save As" pop up box, which is not appearing here! what should I do?

  • Chain interfaces to set file name in sender channel dynamically

    Hi,
    I have a requirement to use the Seeburger SFTP adapter to import a file from an external server to an SAP ECC system.
    The adapter must be Seeburger as the protocol has to be SFTP, not FTPS as with the File adapter.
    Although I can set a wildcard selection, I really want to poll for specific filenames with predetermined naming criteria.
    The sender SFTP communication channel doesn't provide any options to specify dynamic attributes but I wonder if I can link several interfaces together, please can you confirm if the following process would work conceptually:
    1) SAP ECC program runs and determines the fixed filename that I wish to import (e.g. file_abc123.xml).
    2) SAP ECC program calls an outbound proxy with a mapping to set the relevant parameter in dynamic configuration ('http://seeburger.com/xi' is the namepsace, 'dtSubject' is the parameter name for the filename of the SFTP adapter).  Besides mapping I think the Seeburger attribute mapper module could also be used to set this value.
    3) The outbound proxy is configured on the receiver side to call an SFTP sender channel (with a dummy/blank payload as we're only calling the interface to allow settng of the filename to take place) which links to an inbound service interface on the SAP ECC receiver side. 
    I don't know whether chaining of service interfaces in this fashion (receiving interface also being a sender) is a viable approach or whether there are any alternatives.
    Thanks in advance,
    Alan

    Hi Alan,
    Are the specific file names that you are polling for going to be changing or will they be fixed?  Are each of the unique names going to be processed using the same interface?  If so then I would just create multiple SFTP sender channels that poll at different intervals but use the same mappings, etc.
    Regards,
    Ryan Crosby

  • How to set file name and destination folder without user interaction

    how can I set the file name and destination folder to generate a pdf file like "c:\myfolder\document.pdf" in this folder automatically.
    Is there a tag in .joboptions ?
    Goal: User click print button. In the background a pdf will be generated in e.g. "C:\myfolder\document.pdf".
    that`s it.
    I know that the query dialog for save as can be turned off. But the file name depends on the application.
    Thanks for your help.
    TK

    Hello,
    Please post this  in  PI forums
    Regards, Anil

  • How to set file names?

    Using TCS 5, RH11, FM12, all patched up, if I set a marker, such as "Filename" in FrameMaker, can RoboHelp use the contents of that marker to set the file name of the HTML file it creates? How? Thoughts?
    Cheers,
    Sean

    Hi,
    Thanks for working with me on this. I appreciate your help. The last time I used RoboHelp was when Blue Sky owned it, at the original version 6. I see it has aged logically.
    Cheers,
    Sean

  • Need help in setting file name with special characters in attachment

    Hi
    We have a requirement where we need to set the file name that contains special characters (like Russian) and send mauil using Java mail.
    If we set the file name as such, the attachment in the email contains garbled filename
    Can you pl let me know how to resolve this?
    We should use the file name as attachment name and this will have say special characters. The receiver who gets the mail should get with the correct attachment name
    One important point.. the attachments are opened from MS outlook.
    Thanks and regards
    Ram
    Edited by: 884910 on 13 Sep, 2011 5:00 AM

    Read the FAQ carefully. You don't need to call encodeText unless you're using a really
    old version of JavaMail.
    And, it depends on whether the mail reader you're using is handling encoded parameters
    according to the (new) MIME standard, or according to the (old) non-standard hack.
    Sadly, without knowing what mail reader the recipient is using, it's impossible to use
    encoded filenames that will work everywhere.

  • File information -- How to retrieve file name from header variable

    Hi
    I am using File Adapters to read files(.xml) and then I need to perform some database operations.
    One of the requirement is storing the file name read into the DB.
    I searched through the forum and got the information on how to configure this in the header variable. The link below shows the same.
    File Adapter
    Now, I use the XSL mapper to map the source values(from input xml file) to the corresponding table column names. So how should I get the value of the file name.
    I saw some of the in-built functions to be used for this but there is not enough documentation to proceed.
    Can anyone please provide some solution on this.
    /Kiran.

    Hi,
    Here are the steps that you need to do after you have declared the variable.
    1) The variable that you have declared should have the following elements
    a) Filename
    b) Directory
    2) Use the assign activity to copy the value of the filename part of this variable to the arg that needs to be passed to the database. (most probably an invoke variable).
    If you still have any problems implementing this, mail me at [email protected]..and i'll send you the screen shots for the entire process.
    ciao,
    Gunjan

Maybe you are looking for