bpanda
15th May 2015, 12:36
Hello,
I want to know how I can disable forms (static) in baan5.

For example on the session tibom1510m000 there are 2 forms.
But only one form appears at a time.
When we change sort by in the session then it the other form appears.
But only 1 form at a time.
How we can achieve same std session's functionality?

As I'm new to Baan 5 and very less knowledge about static forms Please give me idea.

Thanks & Regards
Biswajyoti Panda

mark_h
15th May 2015, 15:49
Need someone with more expertise than me. Never done something like this, but I am thinking you create a sesssion with two forms. On both forms disable the forms commands so the user can't switch back and forth. Then in the choice.change.order after.choice event you use to.form(2) or to.form(1). That way it switches back and forth between the forms, but only when they change the sort order.

vamsi_gujjula
18th May 2015, 15:37
i have see using to.form() but it been quite long , so i have a basic idea what has been done

basically if the know the current sort order ( using curr.key predefined variable)

lets say form1 = key1 and form2 = key2

you can use check condition that key = 2 then on form.1 , sections you can used to.form(2) and viceversa on form2

its explicitly forcing a user to go to a relevant form using required condition.

bpanda
22nd May 2015, 12:41
Thanks All for all your suggestions.

I got the this solved.

The exact answer is

long max.formtabs 4

(Defines the maximum number of form tabs to be displayed. Set in the before.program section.)

I just set max.formtabs = 1 in before.program.
This displays only one form, there will be no tabs nothing. when you change the index you can change the current form. So at a time only form will be available on the session.

Thanks & Regards
Biswajyoti Panda

vamsi_gujjula
22nd May 2015, 14:37
thats great !!! i never even was aware that there exist a predefined variable max.formtabs