Content validation before uploading file

Hi,
We want to do some validations before uploading an excel file to OBIEE :
1 - check the file extension
2 - do some data validation on the content of the excel file.
I succed in doing the first step by adding some javascript customization to OBIEE javascript files. However, i cant do the second step with javascript, because i need to read the excel file content and make connection to a database to perform the validation.
Is there any way, to do the validation in server side so that i can read the excel file and make the database connection with a java code.
Thanks.

Hi,
Actualy, users produces some informations about production. These informations are in excel files because there is no application for this business area. Also they want, throw OBIEE 11g portal, to upload their files them selves, have a validation workflow of the file in obiee, and then automatically copy excel files content in a oracle tables and create some reports on these tables.
I dont know if these needs are possible in the obiee 11g platform, so i start doing a prototype. Now, i'am in the first step of uploading the excel file into a folder in the obiee catalog. However during the upload a file a need to do some technical validations (null values, numeric values, ...) and check if the value of a specific column exists in a table on an other database.
Therefor, the xls file is not a variable it's uploaded every time a user wants it. The production environnement of obiee 11g is AIX, however for the prototype, i will user an environnement on windows.
Thanks.

Similar Messages

  • How to get the content of the uploaded file.

    Hi Experts,
    I am using a input box to get the path of the file to be uploaded.(I am not using FILE UPLOAD UI Element).Could you please let me know how to get the content of the uploaded file.
    Regards,
    Arun

    >
    ARUN KUMAR.S wrote:
    > Hi Experts,
    >
    > I am using a input box to get the path of the file to be uploaded.(I am not using FILE UPLOAD UI Element).Could you please let me know how to get the content of the uploaded file.
    >
    > Regards,
    > Arun
    You will not be able to use a normal InputField to upload file contents.  This is not allowed by the browser security model. You must use one of the upload specific UI mechanisms - the FileUpload UI element or as of 7.01 ACFUpDownload or FlashIslands.

  • Can we apply custom validation before uploading data in WebADI in 12.1.3

    Hi,
    I have requirement of applying custom validation before uploading data from spreadsheet using webADI. How can we do that.
    Is there any way in desktop Integration Manager Responsibilty in WebADI.
    I have just started exploring webADI
    Please Help Me...
    Thanks,
    Suhani

    Why are you posting this in OAF?
    Anyway you can by creating a custom PL/SQL wrapper that is called by the WebADI.
    Raise an application ERROR in your wrapper and it will show in the WebADI
    If you just want to validated VALUES, you are better of creating an LOV on the Column. Then WebADI will do the validation work for you.
    Jeroen

  • Edge Animate file turns black when viewed in Folio, but worked great in adobe content viewer before uploading to folio panel.

    What am I doing wrong?
    I created simple animations to work in DPS. Basically hot spot button that toggle on and off showing features and benefits. When viewed and tested in adobe content viewer, everything worked great. Now that I am ready to upload the folio as an ipa app. The animations turn black over the image that it is supposed to be on top of.
    Any help would be much appreciated.

    Thanks Neil, that worked once I'd installed it directly into the Applications folder, not within a subfolder.
    So if anyone else has this issue, install the Desktop Viewer app for CC and it works for both CS6 and CC.
    NOTE, that you need to double-click the Install Adobe Content Viewer.app file, don't look for a file called Install Adobe Content Viewer.air as per the instructions, as they are out of date.
    Phew, I have finally got all my DPS functionality back, and have created a V27 app using V28.

  • Data Validation Before Upload to BPC

    Hi All,
    We pump in trial balance data from our SAP system to BPC with some breakdown to match dimension combination in BPC. One of the required steps is that to have a checking procedure to see whether downloaded data is balanced or not, before we upload to BPC.
    Would you mind sharing with me how best to have this checking, or if you have some experience on how this validation works in your company, i would appreciate it very much if you can share it.
    Thanks a lot,
    Liam

    Hi Nilanjan,
    Thanks for replying.
    If we use Business Rule function, then we would have to upload it to BPC first and let Business Rule run the validation.
    Our objective is to make sure the figures in the flat file is correct (balance in accounting view), before we submit to BPC.
    Thanks,
    Liam

  • How to read the contents of the Uploaded file ?

    hi @,
    I have used the File upload and Download UI elements as per the tutorial available. Now my requirement is to read the contents of the file and transfer it to the Backend system.
    How can I achieve the desired fucntionality.
    Thanks in advance,
    Regards,
    Amit

    try this code to store image file in back end system.
    IWDResource res=wdContext.currentMyDataElement().getPictureres();
              InputStream in=res.read(false);
              ByteArrayOutputStream bout=new ByteArrayOutputStream();
              int length;
              byte[] part=new byte[10*1024];
              while((length=in.read(part))!=-1)
              bout.write(part,0,length);
              in.close();
    pstmt.setBytes(8,bout.toByteArray());
    If it is other than image file like word or text then try this in action
    IWDResource resource = wdContext.currentResElement().getResorce(); // your existing handle to the upload resource type
                try {
                   InputStream stream = resource.read(true);
                   byte b[]= new byte[1000];
                   stream.read(b);
                   String str = new String(b);
                   int i=str.length();
                   wdContext.currentContextElement().setOut(str);
                   wdContext.currentContextElement().setSize(i);
                   wdContext.currentResElement().setResourceurl(
                        wdContext.currentResElement().getResorce().getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()));
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    The in back end field where u store the file should be byte array.
    Regards,
    H.V.Swathi

  • How to change "Display column content" on a uploaded file link?

    Hi,
    I based my portal form on a table with a field of type BLOB. I used this to upload any type of file. I have no problem in uploading my file, when I query the information, a link comes up with the words "Display column content". I can click on that link to see the content of my file. But is there a way to change the wording "Display column content"?
    null

    Yoy can change the link by editing the generated package

  • Content Validation before Mapping

    Hi all,
    I have the following requirement. I ll read a file as input. I need to check if filename equals one particular field in the source. if equals then i ve to go ahead doing mapping and the rest. Else i dont want to process anymore. please help me in a step by step procedure for doing the same.
    Thank you
    Sumayya T S

    I think you can do this by using the Context objects.
    First get the Filename into your dummy element in target strcutre using UDF and create the context object between your dummy element and another element which holds the filename with equal conditon and use this context object in the receiver determination.
    But I am not sure about it because i never tried this.
    <b>UDF as follows:</b>
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
    "http://sap.com/xi/XI/System/File",
    "FileName");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create(
    "http://sap.com/xi/XI/System/File",
    "Directory");
    String source = conf.get(key);
    String tar_dirname = "/mqm/mqmprod/temp/out/ " + source.substring(14,18); */
    String tar_fname =source.substring(19,20);
    String tar_dirname = source.substring(14,18);
    conf.put(key, tar_fname);
    conf.put(key1, tar_dirname);
    return tar_fname;
    Warm Regards,
    Vijay

  • UIX Upload File

    Hi
    I've tried to upload a file using UIX Servlet.
    I had used code from UIX Developer Guild and it's success .
    Now I want to know How to check whether the file name being upload from user already exits in the target folder on my server. And I also want to know how to alert user via javascript's popup , I means how to use javascript and UIX in combination
    Could you please give me some idea ?
    Thanks

    Attila -
    Assuming you are using uiXML - check out the "Multipart requests" section in the JavaDoc for the oracle.cabo.servlet.AbstractPageBroker. The gist of it is that you'll want to create an extension of UIXPageBroker which overrides doUploadFile() and uses the MultipartFormItem API to get at the contents of the uploaded file.
    If you are using UIX JSP, you can use the oracle.cabo.share.util.MutlipartFormHandler to explicitly process your multipart requests.
    And of course, you'll want to include a fileUpload component in your UIX document - and be sure to set the "usesUpload" attribute of your UIX form to true.
    Andy

  • UIX XML & Download Of Uploaded Files.txt

    What is the right way (in UIX XML) to show the content of an uploaded file (retrieving it from a BC4J component)?
    Documentation, Samples?

    your question is rather vague; are you asking how to handle a fileUpload using the UIX controller? Please see the javaDoc for the class
    oracle.cabo.servlet.AbstractPageBroker

  • Help: How can I implement upload file in UIX ...

    without interMedia option.
    Can anybody help me?
    Thanks!

    Attila -
    Assuming you are using uiXML - check out the "Multipart requests" section in the JavaDoc for the oracle.cabo.servlet.AbstractPageBroker. The gist of it is that you'll want to create an extension of UIXPageBroker which overrides doUploadFile() and uses the MultipartFormItem API to get at the contents of the uploaded file.
    If you are using UIX JSP, you can use the oracle.cabo.share.util.MutlipartFormHandler to explicitly process your multipart requests.
    And of course, you'll want to include a fileUpload component in your UIX document - and be sure to set the "usesUpload" attribute of your UIX form to true.
    Andy

  • Checking filename length in File Browse item before uploading

    I have a File Browse item from which users can upload files into the database. Within APEX, the file metadata and content first get uploaded into the view WWV_FLOW_FILES. By design apparently, the underlying table for this view has a NAME field which is limited to 90 characters. I would like to test the length of the Name field and provide a warning to the user if the name exceeds 90 characters, but any validation I write to that effect does not "fire" until after the file has been uploaded to the WWV_FLOW_FILES view. That attempt to upload apparently is the first thing that happens when you Submit with a File Browse item, even before the validation. If the name of the file exceeds 90 characters in length, the attempted upload errors out with a generic Page Not Found error. Is there any way to capture the length of the Name of the file with a File Browse item prior to the attempt to upload to the WWV_FLOW_FILES view, or is my only option just to put a warning banner on the page?

    Hello Mike,
    >> Column NAME in WWV_FLOW_FILES is VARCHAR2(90). It does not include the local filename path. It include a prefix like "F1521676842/" in the front of the filename.
    Yes, you are correct. I spoke from memory, and it seems that I remembered one of my customized tables, where I also save the local full path of the file.
    As far as I can see in my system, the extension of the ‘F123….’ is not with a fix length, and the highest one is 18 characters long. Therefore, it seems that the actual file name should be less than 70 characters long.
    A similar code to the following can be used in a validation check:
    <script type="text/javascript">
    function checkFileName(pThis){
      if (pThis.value != "") {
         //get path value (including file name)
         var fileAndPath = pThis.value;
         //find the index of the last "\"
         var lastPathDelimiter = fileAndPath.lastIndexOf("\\");
        //get everything after the last "\"
        var fileNameOnly = fileAndPath.substring(lastPathDelimiter+1);
        if (fileNameOnly.length >70) {
          alert("File name " + fileNameOnly +
              " is too long (" + fileNameOnly.length + " characters).");
          pThis.focus();
    </script>The “HTML Form Element Attributes” of the item should include:
    onblur=" checkFileName(this)"
    Regards,
    Arie.

  • Verification of an uploaded file BEFORE upload - The Answer

    Hello fellow CF Maniacs...
    As many of us may have experienced, when someone uses a form
    on a site to upload a file, it can be quite a pain to have to wait
    for the file to be uploaded before it gets verified as the correct
    file name or file format.
    I set out on a quest to find a javascript solution to this
    problem.
    What I was looking for was a way for the actual filename
    selected by the user, regardless of what directory structure
    information was in the file field upon submission, to be verified
    before the upload took place.
    For instance, if the site were expecting a file called
    'myfile.jpg', when the user clicked on the browse button to select
    the file, the resulting string of text could be anything.
    It might be 'C:\myfile.jpg' or
    'D:\SomeDirectory\AnotherDirectory\YetanotherDirectory\myfile.jpg'
    Worse yet, it might even be the wrong file entirely.
    Up until now, I've always had to allow the file to be
    uploaded and then verify the file was correct.
    When you're getting large files from users, and even small
    ones at times, this can be a 'patience issue' for the user. They
    wait around for the file to be uploaded, just to be told 'Oops, you
    sent the wrong file, please try again'.
    After a few hours of trial and error, I came across an
    unrelated javascript file that seemed like it would work for my
    requirements. And it did. Yes, if the user has javascript disabled
    there's the chance this wont work - but for those who have it
    enabled, it could save a lot of bandwidth in uploads and reuploads,
    and a lot of time for the user.
    The following example can be used to create a page called
    'testform.cfm'.
    The only value in the following example form that you would
    change is:
    filename.ext = the filename and extension you require to be
    selected (i.e. myfile.jpg or somefile.html)
    This code will work 'out of the box' if you just want to put
    a specific filename in the 'thefilename' field. However, this will
    mean that everyone user uploading a file will be sending the same
    filename as everyone else.
    I wont go into how to get unique filenames for each user,
    because that's not what this instruction page is for. If you need
    unique filenames, there are a variety of ways to change the passed
    value of 'thefilename' to accomodate them.
    Enough yacking.. here's the code:
    <!-- content of testform.cfm --->
    <cfif parameterexists(field2) is 'no'>
    <script language="Javascript">
    <!--
    function copyData(from,to) { to.value = from.value }
    // -->
    </script>
    <form name="myForm" action="testform.cfm" method="post"
    enctype="multipart/form-data">
    <input type="file" name="field1"
    onchange="copyData(this,document.myForm.field2)"
    onKeyUp="copyData(this,document.myForm.field2)">
    <input type="hidden" name="field2"
    onchange="copyData(this.document.myForm.field1)"
    onKeyUp="copyData(this,document.myForm.field1)"><input
    type="submit" value="go">
    <input type="hidden" name="thefilename"
    value="filename.ext">
    </form>
    <Cfelse>
    Field 2 is
    <cfoutput>#field2#</cfoutput><Br><BR>
    <cfset namelength = #LEN(thefilename)#>
    <cfset actualfile = #RIGHT(field2, namelength)#>
    Actual Filename picked on form was:
    <cfoutput>#actualfile#</cfoutput><Br>
    Looking for the filename:
    <cfoutput>#thefilename#</cfoutput><Br>
    <cfif #actualfile# is not '#thefilename#'>
    File did not match - don't continue with upload
    <cfelse>
    File matched - continue with upload
    </cfif>
    </cfif>
    Perhaps someone will come along and make this work even
    better. But at least this works :)
    Kudos,
    eTeli.com

    Oops.. perhaps I should explain what is happening when this
    code is used.
    First off, there is a file input field (field1).
    Secondly there is a hidden field (field2).
    What the code is doing, is taking whatever text appears in
    field1 and automatically inserting it into the hidden field2 value.
    When the form is submitted, the field1 value will be changed
    by the server to some temporary value - which is of no use when
    you're trying to find out the actual text that was in the field to
    begin with.
    But, since the hidden field has a 'copy' of that value, and
    the hidden field doesn't get changed to a temporary one, you have
    something to work with before the file gets delivered to the
    server.
    Pretty simple solution really.. too bad it took me hours to
    find it.
    I went through everything from using regex searches and finds
    to trying to disable the submit button if the filename was
    incorrect.
    Everything else I tried failed.
    Hope it works for you :)
    eTeli.com

  • Validating the Data in Excel before uploading

    Hi all,
    I have a requirement where i need to uplaod an excel file from the users local system to Server. 
    But before saving i want to do certain validation on the Excel file which the user is trying to upload.
    1. Is the Excel file in the same format as expected . ie the coloumn order , all the required coloumns etc
    2. is there a possibility for me to check if certain coloumn values are mandatory .
    Can you please guide me providing some docs on coloumn validation of the Excel.
    Thanks,
    Swetha

    Hi Swetha,
    First you have create one Value Node that node having 5 attributes. For Example you excel having 5 Columns data So you can create 5 attributes  under value Node.
      Can u see below Code.
    IPrivateASNFileUplaodView.IASNDetails_PopUpNode node = wdContext.nodeASNDetails_PopUp();
    IPrivateASNFileUplaodView.IASNDetails_PopUpElement ele;
    if(node.size() > 0)
    for(int i =0;i <node.size();i++)
    ele = node.getASNDetails_PopUpElementAt(i);
    if(ele.getOpn_Quantity() != null )
    flag = true;  //wdComponentAPI.getMessageManager().reportException(ele.getQuantity()+"val",true);
    else
    flag = false;//wdComponentAPI.getMessageManager().reportException("else-c1",true);
    break;
    if(ele.getPo_Number() != null && ele.getPo_Number().length() != 0 )
    flag = true;     //wdComponentAPI.getMessageManager().reportException(ele.getPlant()+"val",true);
    else
    //wdComponentAPI.getMessageManager().reportException("else-c2",true);
    flag = false;
    break;
    if(ele.getPo_Item() != null && ele.getPo_Item().length() != 0 )
    flag = true;     //wdComponentAPI.getMessageManager().reportException(ele.getMaterialNumber()+"val",true);
    else
    flag = false;//wdComponentAPI.getMessageManager().reportException("else-c3",true);
    break;
    if(flag)
    wdThis.wdGetCO_ASNFileUplaodController().executeYmm_Sc_File_Upload_02_Input();
    wdComponentAPI.getMessageManager().reportSuccess("File Upload Sucessfully");
    else
    wdComponentAPI.getMessageManager().raiseException("Please fill in all the values in Excel sheet and Upload Again.",true);
    By using this code Validating the Data in Excel before uploading .
    Hope this is help full for you Swetha,
    Regards
    Vijay Kalluri

  • Validation error after File upload

    HI,
    I am using a file upload functionality in OAF page.
    When i browse for the required excel file and click on browse, the data is popluated on the oaf page.
    I have 2 lov fields on page - say a & B.
    B is a dependent LOV on A.
    I have a validate button on my page which gets enabled only after file upload and validates if the data is correct or not.
    The issue is like if i am having value in upload file for A as 1 and for B as 1800, but my LOV B has 2 values 1800 & 1800-01 for LOV A = 1, it gives me an error at that LOV "Select a Valid Value". If i open the LOV B window and select 1800 from it the data is correctly validated without any error.
    Please help me that how can i rectify this error i.e. it should validate the data corrrectly if i pass the value 1800 to it thru excel sheet.

    See take an example of Employee name LOV .We know for every employee a unique emp Id is related to it.So if two person are having same name also then also their ID is different.In such cases , while creating LOV we create a FormValue for EmpID .Its not visible on Page but while validating the page formValues are also considered thereby it doesnot cause invalid value error...
    In Your case, what you can do is the way you are populating the LOV field you can populate this FormValue to remove the Error.
    Please Refer Jdev Guide for more info..
    Hope it helps!!!
    Thanks
    AJ

Maybe you are looking for

  • Why is my youtube webpage not displaying properly?

    My youtube webpage is not displaying properly. its like tthere is only text and thumbnails and the whle webpage is too damn long. The videos don't play when clicked. Problem on both firefox and chrome. I disabled kaspersky av but it didnt make any di

  • To inset something in a pdf file

    What are the procedures to inset a ward and a number to the pdf file?

  • HP Mini- left mouse button is broken. warrany?

    I bought an HP Mini about six months ago, and I have recently been having trouble with my left mouse button. You see, my left mouse button is loose, wiggly, and does not respond as well as it used to. IT is also not raised as high as it is supposed t

  • Gstreamer plugins not found on mirrors...

    Wassup with this?  I would like to install rythmbox, but without the gstreamer plugins, I can't play most of my 23 gb library. Last edited by stuman (2010-07-04 21:59:52)

  • OEM 11g R1 grdi installation

    During the installation of 11gR1 grid on AIX platform do we really need to install the Java SE development kit and the weblogic software....becoz these 2 softwares are supported only in linux,windows and solaris..im worried becoz they dont have compa