sameer.don
22nd October 2008, 10:01
Hi,
I am developing a session with form type 3 i.e Multi Occ +View.
I have put 2 table fields (not part of any table index) and 2 form fields in "View" part of form. All four fields are Input fields (though data in these fields will not be saved, but just used for some internal processing).
Along with these 4 fields I have also put a Table index field (order no) as a Display field, in View part

However session doesnt allow to input data in those 4 input fields. This happens because of table index field on form.

Input to these fields was allowed when table index filed was removed from View part. But when removed the index field, all records in the table appear on form, irrespective of current index field value (i.e. all the orders were shown on form).

How to enable input to these fields, without removing table index filed.

sprasad
23rd October 2008, 12:47
Hi Sameer,

These fields will be editable while inserting a new group but cannot be editable in modify mode as they considered to be part of index with table index field on the form.You can use another sub-session for the four additional fields.

Regards,
Sai Prasad.

sameer.don
24th October 2008, 13:00
Sai prasad thanks for the reply.
Group insert is not desirable in this case.

But the problem was resolved using function single.fields.on.mocc.form()
This allows the view fields to be editable in Modify mode.

Thanks
Sameer

dhruv_x0
4th January 2011, 07:03
Dear Sameer,

I am facing similar kind of problem...could you please tell me how to use single.fields.on.mocc.form()

sameer.don
4th January 2011, 07:55
Dhruv,

You can use this function in before.program section. And you can pass field names as strings.

Taking a case that, I want to make editable 2 of the view fields, viz., tdpur040.cuno (which is a table field) and total.amnt (a form field).

I shall write code like:

before.program:
single.fields.on.mocc.form("tdpur040.cuno ","total.amnt")

However, this is not being standard baan functionality; it exhibits a bit strange behavior.
Such fields will be visible and editable only when at least one of the records is being edited. i.e., when flag UPDATE.STATUS = MODIFY.SET

You can observe the same behavior in a baan standard session - ticst0101m000
You can find a few fields at bottom, which are single occurrence fields, and get enabled when you try to modify any of the records.

Regards,