New Posts New Posts RSS Feed - Parameters are not passed from command line
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Parameters are not passed from command line

 Post Reply Post Reply
xtrailrunner View Drop Down

Joined: 14-January-2019
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote xtrailrunner Quote  Post ReplyReply Direct Link To This Post Topic: Parameters are not passed from command line
    Posted: 14-January-2019 at 8:52am
I'm using V3.0 and would like to pass three parameters from the command line:

"C:\Program Files\ORCL Toolbox\FormsAPI Master V3.0\FAPIMaster.exe" /SCRIPT /API=12c /RUN="D:\API_Master\My_Scripts\colors.p2s" /infile="emp.fmb" /outfile="emp_neu.fmb" /path="D:\API_Master\Modules\"
Here is the relevant part of the code in colors.p2s:
  //Add parameters
  ps := TParamScreen.create;
  pb := ps.AddBoard('Batch',picModules);

  //Log parameters
  for i := 0 to ps.paramcount-1 do
       logadd(' : '+ps.param.value);

The log output shows that there are no parameter values passed.
I don't want to use a parameter screen, just want to pass the parameters from the command line.

Regards Juergen
Back to Top
administrator View Drop Down
Admin Group
Admin Group

Stefan Mueller

Joined: 25-January-2003
Location: New Zealand
Points: 1031
Post Options Post Options   Thanks (1) Thanks(1)   Quote administrator Quote  Post ReplyReply Direct Link To This Post Posted: 15-January-2019 at 3:32am
Dear Juergen,

Please add a call to the "ShowParamScreen()" function before reading out the parameters. This will set to parameters to the correct values your set from the command line:

  if ps.ShowParamScreen('Enter parameters ...') then
      //Log parameters

The showing of parameter-screens works in combination with the /SHOWPARAMSCREEN command line option:

Shows the parameterscreen if any. Default when called from command line is to not show the screen and instead pass the parameters specified with /paramname= as the values into it!

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.