simple form that is linked

Hi there,

I have a simple form that is linked to another form. The problem is, that I can’t figure out how to set Navigation correct.

When I disable Toolbar Button FIRST, PREVIOUS, NEXT, LAST and start application, he is always asking for my key_id. When I use a MENU APPLICATION and link to the form, he starting the form in blank mode by setting key_id = 0 (the way I want it, but without MENU APPLICATION). I don’t want my user to insert multiple records with FORM NO 1, that is why I disabled Toolbar Buttons FIRST, PREVIOUS, NEXT, LAST.

Another issue is the linking to my FORM No 2. This works fine, but when I navigate back to my FORM No 1 I get another blank form and not the record that I already inserted. Do I need a some kind of global variable to be passed across both applications?

When I am done with FORM NO 2 and I can still update the form. This is fine, but why isn’t there a button that will exit or finish the Application? Do I have to build this button myself?

I want:

  • user entering data in form 1
  • user is getting linked to form 2
  • user is entering data in form 2
  • user can update form 2 or go back to form 1 and update form 1
  • user can finish app on 2nd form

Re: simple form that is linked

SC buttons are #$%#%$ nightmare. I have discussed this with them on many occasions. The logic is decided internally in their code based on visibility and other factors. SC wants to do the thinking for you and it creates havoc if want different behavior.

You would have to provide a working example to get a better answer.

Regards,
Scott.

Re: simple form that is linked

Thank you ScottMartin. I like Scriptcase even though I had to dive into PHP (Now I know it makes sense to learn PHP with Scriptcase), but some behaviour is strange. Like:

  • Invalid data handling within form. Especially with date time field. Either make the tab stay in field until data is valid or mark invalid fields red OnValidation and focus first error field.
  • Fire Ajax Events with Calendar
  • Messages centered with long forms (some are presented top and with long forms user can’t see the message)
  • Auto-Complete in IFrame throwing results on any match and make it possible to enter new data
  • Exit Button (I build this one myself)
  • Order within the custom lang file in backend.

Some more PHP codes/samples in backend would be nice. I hope some of the little things will be fixed so I don’t have to break my head.

Let’s see what SC6 will offer :wink:

Just a hint, in SC7, if you remove the “Insert” button on the toolbar, you will eliminate the “insert”/“add” option when the user clicks “Back” or otherwise navigates to the form.
Keep in mind I’d suggest other safety methods to prevent an unwanted form from being submitted, like returning error on the BeforeInsert event. Not sure if that’s needed, but it’s better to be safe.

Not sure if this is what you need but put sc_apl_conf(“app_name”, “start”, “new”); in ApplicationInit Event. Add the “Last” button to the toolbar and on the onScriptInit Event put sc_btn_display(“last”, “off”); This way your form will start in insert mode and It won’t be looking for an initial record. When you remove all navigation buttons SC doesn’t know how to start the app.

1 Like