Request Form in Dataport

lavanyaballurgi
lavanyaballurgi Member Posts: 235
Hello Experts,



How to add a request form in Dataport. I tried to add it the way I add in Reports but then I cant see the "FILE NAME" & text box (from which i used to browse the file to be uploaded) when I run the Dataport (where we give the path of csv file).

Help....

Answers

  • Chinmoy
    Chinmoy Member Posts: 359
    We have all done this so many times. I can't figure out what you may have done wrong. But if you add some variables in the request form, the Options tab is definitely displayed when you run the dataport. Check for potential issues, like, did you add anything in the request form? etc.

    Chn
  • lavanyaballurgi
    lavanyaballurgi Member Posts: 235
    Oh yes I added an OPTION VARIABLE in the request form. Is that allowed?
  • lavanyaballurgi
    lavanyaballurgi Member Posts: 235
    I am sorry for the mistake... Actually I can see the option tab but cant see the import/export box from which I used to brows the file for uploading
  • Chinmoy
    Chinmoy Member Posts: 359
    Sure!

    Set the property LookupMode in the Dataport as Yes. NAV will automatically add the selection of the file and path.

    Chn
  • lavanyaballurgi
    lavanyaballurgi Member Posts: 235
    Not able to find lookupmode in property of dataport :(
    NAV2009 R2 version... screenshot attached..
  • Dev
    Dev Member Posts: 74
    Yoy have to customise file selecting Dialogue box with your added field.
  • Chinmoy
    Chinmoy Member Posts: 359
    Sorry typo... it is the property of the request form... :)
  • Chinmoy
    Chinmoy Member Posts: 359
    Nope... you don't need to customize anything to get the filename from the OS.
  • lavanyaballurgi
    lavanyaballurgi Member Posts: 235
    thanks Chinmoy but still it wont work.. What I found is this (and it works)

    To enter the Filename I created a textbox with ID 1 (FileExplorer-Feature!), SourceExpression as some TextVariable "VarFilename" and code in OnAssist of this TextBox:
    CurrDataport.FILENAME := VarFilename;

    I guess this is what DEV meant right?
  • Dev
    Dev Member Posts: 74
    Making LookUpMode = Yes is hiding all the default option of Request form. In my idea we cant alter the Request form of a DP
  • Dev
    Dev Member Posts: 74
    Yes, lavanyaballurgi you have done in right now. :) Gud
  • Chinmoy
    Chinmoy Member Posts: 359
    Can't agree with you both. No code is needed to get filename for import/export on NAV dataports.

    lavanyaballurgi: Please let me know what you find from the sample dataport I have sent you.

    Chn
  • Chinmoy
    Chinmoy Member Posts: 359
    Oh yes... I think I got it... Are you fetching values of some more variables in the request form? In that case you need to follow Dev I guess. But if it is only Filename no need to write any code.

    Chn
  • lavanyaballurgi
    lavanyaballurgi Member Posts: 235
    :D Well thanks to both of you & sorry for confusing you Chinmoy :wink:
  • kine
    kine Member Posts: 12,562
    Just conclusion:
    If you add something to the request form, you need to add all "standard funcionality" manually. It means, if you need to have Export/Import radiobuttons, you need to add them and use appropriate CurrDataport.Import value. If you need filename selection, add textbox, set Control ID to 1, enable assistedit = yes on it. Than use the value as CurrDataport.FILENAME. I think this is teached on first day of developer classes... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • lavanyaballurgi
    lavanyaballurgi Member Posts: 235
    And where are these developer classes given? I am tired of searching such course in India ](*,)
  • Chinmoy
    Chinmoy Member Posts: 359
    lavanyaballurgi: check with Microsoft India, they organize these (through other training partners though) periodically. If you are subscribed to their news letters, you will come to know when and where these classes are held.

    Chn
  • lavanyaballurgi
    lavanyaballurgi Member Posts: 235
    Thanks Chinmoy.. will try to get into one..