Form questions

Hi,

I am new to scriptcase.

I have been using it for two weeks.

Can someone please answer these questions.

I have got two forms, I want to copy the value of a field from one form to a field on another form. how can i do this?
I want to copy the value so that the user does not have to re-enter the same value in the second form.

I have a master form and a detail form. After I insert a new record in the master form, it takes me to some other record in the table.
I then have to find the new record that I have just entered in the form.
How can I ensure that the new master record I saved in the database stays on the screen so i can enter the corresponding detail record?

If I create a global variable in one of the events a new page for the global variable shows up.
I don’t want to see a page, I just want to store a value, which I can use else where.
how can i do this?

Thanks

I have got two forms, I want to copy the value of a field from one form to a field on another form. how can i do this?
I want to copy the value so that the user does not have to re-enter the same value in the second form.

In the onvalidate of the first form you set global variable with your field values like;

[glob_name]={name};
[glob_state]={state};

In your second form you can use onload event to do the reverse:
{name}=[glob_name] etc.

or use default value to set to [glob_name]

I have a master form and a detail form. After I insert a new record in the master form, it takes me to some other record in the table.
I then have to find the new record that I have just entered in the form.
How can I ensure that the new master record I saved in the database stays on the screen so i can enter the corresponding detail record?

There’s a property somewhere which tells you what to do when a record is inserted. If you uncheck this field (which by default goes into insertmode after inserting record) then it should work fine imho.

If I create a global variable in one of the events a new page for the global variable shows up.
I don’t want to see a page, I just want to store a value, which I can use else where.
how can i do this?

This only occurs while testing. It allows you to enter a global variable if you want to test the module alone. If you don’t want that you can set the global to be of type output, but if it is used as input you will get a php error saying that the variable is not declared.

Thanks[/QUOTE]

Thanks for clarifying 2 and 3.

For first question, I have changed the Application -> Navigation -> “Return After Inserting” from no to yes. But it did not make any difference. This was the only setting that I could find which was related to insert.

If you can find the exact setting that I need to change then it would be great.

Or is there a macro which I can call to select the record that I have just inserted or navigate from one record to another. May be I can put this macro in onafterinsert event and retrieve the record I have just inserted.

One other question.

I have broken down my detail form in blocks with tabs, so fields from the same table are grouped together in blocks under different tabs. There are required fields under each tab which need to be filled.

When a required field is missing and I press the “Add” button, the focus does not go to the missing required field, unless the required field is on the left most tab. How can I ensure that the focus goes to the required missing field of a different tab and the tab also gets highlighted.

I have tried setting “Highlight Field with Error” to “yes”, but this does not work.

Thanks

Hi,

Is anybody able to help me please?

Thanks