I am using a proship velocity form, which uses a limited version of vb script. Below is…
- User
I am using a proship velocity form, which uses a limited version of vb script. Below is the help on the object. The form should populate w/the corresponding values (verified elsewhere) but does not - what can I try?
Function ShowForm (FormName As String, Optional MakeModal As Boolean, Optional AddOKButton as Boolean, Optional IntlLIIndex As Integer , Optional AddCancelButton As Boolean, Optional OK_Button_Name As String, Optional Cancel_Button_Name As String ) as Long Displays the predefined ProShip formFormName - Form Name to Show MakeModal - Will show modally (User must close to continue) if set to True. AddOKButton - If set to True, will add an "OK" button at the bottom of the form. IntlLIIndex - If showing a form with International Commodity Lines, sets the ordinal index to this value. AddCancelButton - If set to True, will add a "OK" and a "CANCEL" button at the bottom of the form (irrespective of the AddOKButton value). (Req PSC V3.1.183 or later) OK_Button_Name - Overrides default value of "OK" on button, if shown. Cancel_Button_Name - Overrides default value of "CANCEL" on button, if shown.
If MakeModal and AddCancelButton are both True, ShowForm will return "1" if the user selects the OK button, "2" if the user selects the CANCEL button, or "0" if they close with the windows "X" control or some other method. Any changes made to the form take effect immediately, regardless of the button chosen to close the form.
Assistant
Step-by-step analysis of the problem:
- Verify FormName: Ensure that the
FormNameparameter passed to theShowFormfunction matches the name of the predefined ProShip form you want to display. A mismatch here could prevent the form from appearing or populating correctly. - Check Optional Parameters: Review the optional parameters (
MakeModal,AddOKButton,IntlLIIndex,AddCancelButton,OK_Button_Name,Cancel_Button_Name) to ensure they are set according to your requirements. Specifically, ifIntlLIIndexis relevant to your form and is supposed to set a specific value, verify it's correctly set. - IntlLIIndex Value: If your form involves International Commodity Lines and you're using
IntlLIIndex, ensure the value you're passing corresponds to a valid ordinal index. An invalid index might prevent the form from populating. - Form Population Logic: The help provided doesn't detail how the form is populated with values. If the form's population logic relies on external data or specific conditions, ensure these conditions are met before calling
ShowForm. - Error Handling: Consider adding error handling or logging to see if there are any errors occurring when trying to show the form or populate it with data.
Fixed solution:
Given the information provided, there's no direct code to "fix" as the issue seems to be more about troubleshooting. However, here's a basic example of how you might call
ShowFormwith some parameters:Dim returnValue returnValue = ShowForm("YourFormName", True, True, 1, True, "OK", "Cancel")Explanation of changes:
- Specify FormName: Replace
"YourFormName"with the actual name of your ProShip form. - Set MakeModal to True: This ensures the form is modal, requiring user interaction before continuing.
- AddOKButton and AddCancelButton: Both set to
Truefor demonstration, adjust according to your needs. - IntlLIIndex: Set to
1as an example; adjust to the correct ordinal index if applicable.
Tests and example uses:
- Minimal Test: Try calling
ShowFormwith the minimum required parameters (justFormName) to see if the form appears at all. - Parameter Testing: Incrementally add parameters back in, testing each time to isolate if a specific parameter is causing the issue.
- Value Testing: If using
IntlLIIndex, test with different values (starting from 0 or 1, depending on the indexing used) to ensure it's not a specific value causing the issue.
- Verify FormName: Ensure that the
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.