baan1612
19th March 2008, 16:22
Hi,
I have a multioccurence session of form type 3 with 1 view field and I have a single occ field that I need to maintain against all records for the same view field but I also need this field to be modifiable.
Now when I define it as a single occ field it does'nt accept input which is logical but when I make it part of Index then I am not able to modify it later.
So how can I make it single occurence but yet modifiable and I need to update it against each occurence of the view field as well.
Pls help.
zardoz
19th March 2008, 18:40
Use a temporary field, define it in the form as "Input Only" so isn't in the normal flow of input fields, then use a user choice (adding also the button in the form if you want) to change values in that field.
After that, you only have to update all the records with this value.
baan1612
20th March 2008, 05:55
Use a temporary field, define it in the form as "Input Only" so isn't in the normal flow of input fields, then use a user choice (adding also the button in the form if you want) to change values in that field.
After that, you only have to update all the records with this value.
Thanks for your suggestion but I don't want to complicate things for the user by providing a button etc. ,infact I want my form to remain as shown in the screen shot attached and I also want to display the "valid date" (single occ) field as it is which won't be possible if I use a temporary form field.
Looking fwd to any other possible solutions :)
baan1612
20th March 2008, 06:06
Also,when I use a temporary field as "Input Only" (single occ) it does'nt take any input ..so how do I make it accessible to the user?
baan1612
20th March 2008, 06:13
Ok I got your point now..actually I was unfamiliar wth "Input Only" field..
Thanks, I shall try it and get back.
baan1612
20th March 2008, 06:31
Can you pls help me on how to save this temporary field value against all occurences ?
baan1612
20th March 2008, 07:54
Hi,I am able to update the records now using your solution but when I use the 'Input Only' field on the form and input some value in it using the 'input()' function,I need to do it in after field section of the some other field which can be:
1. the previous field (which is single occ)---In this case when I navigate to some other set of records ,their value does'nt get refreshed but dislays the previous set values.
2. some other field (all others are multi occ)--here when I start the session I get the input directly to my "Input Only field" and have to press tab for each filled occ. in order to display those.
pls guide me on how to get over these.
mark_h
21st March 2008, 13:34
How about some screen shots and a copy of the code. That will better help us understand what the problem is. I have never tried this so I do not have a ready made suggestion.
baan1612
21st March 2008, 14:17
Hi Mark...I have posted the screen shots in a previous post but here 2 i needed to work around by defining that field (valid date) as multi occ but making it active 4 only 1st occ and updating it against all other occurences...so the user does'nt have 2 input it again.
But still I would like to do it in a better way so plz suggest
mark_h
21st March 2008, 14:30
Well I do not have a better suggestion - the only places that I update all occurances on a multi-occurance table I use sub-sessions to prompt for the input. In most cases I ask for more than 1 or 2 fields. So I give them a button, launch a subsession and then apply the change. See the attached - in one chase they get to change part of the index on one table - but only one record at a time(changing the warehouse). In the second example after they load records from a file I allow them to do a mass change on the pegging information. I do my best to keep it simple, even if it would be cleaner to just ask for something on the session directly. I do not do this a whole lot, but a few places I can not avoid it.
mark_h
21st March 2008, 15:47
Attached is the code from the parent and 1 of the child sessions. I had no choice on how I solved the customers request. If I had it my way there would be two separate sessions - one for closed production orders and one for non-closed orders. As it is the parent session is a single occurance session for tisfc001 and the child(in this case) is for tisfc010. So depending on the order status I have to launch the appropriate child session. I am not happy with any of the code on these two (or 5 if you include all the child sessions for the two different tables; tisfc010 and tiudi010). I even left some of the stuff in where I have played with things. I do not recommend this unless you have no choice. Baans session which typically use a single occurance at the bottom with a multi-occurance session at the top are much cleaner. This works, for the most part, but I still do not like it.
baan1612
22nd March 2008, 16:24
Hi Mark...thnx 4 ur efforts and valuable suggestions...i have done in the way i posted above n its working fine but ur inputs would b useful in future.
Ankita
22nd March 2008, 19:47
Hi Mark,
Can u tell me that in your session how is it possible to show both parent and child sessions on a single session? In Baan IV is it possible? Or Is it simply you put single-occ fields on the multi-occ session?
Thanks.
mark_h
22nd March 2008, 22:21
Hi Mark,
Can u tell me that in your session how is it possible to show both parent and child sessions on a single session? In Baan IV is it possible? Or Is it simply you put single-occ fields on the multi-occ session?
Thanks.
Yes - this is 4c4 so it is possible. The top session is a single occurance form and the bottom is a multi-occurance form. What you do is create something like 12 lines for the single occurance form - make sure the window is at the top of the form. Then on the child session you create the form on the last 12 lines of the form - in other words more the form to the botton of the screen. Then in parent session set sattr.combined variable in the scripts like in my example. The one problem I have with this is that sometimes the child form does not appear - so you hit the maximize button, save and exit - then rerun the session and it is fine again. I have not figured that out yet. Again I do not like this solution, but it seems to work most of the times.
ysovva
8th February 2010, 12:28
The function: single.fields.on.mocc.form("tablefield") can help to care data for special record (not for all marked or appearing on screen records). The example of this function I didn't find in BaaN V, neither in BaaN VI, but does exist in BaaN IV in the Maintain BOM session.
NirajKakodkar
23rd November 2010, 06:58
The function: single.fields.on.mocc.form("tablefield") can help to care data for special record (not for all marked or appearing on screen records). The example of this function I didn't find in BaaN V, neither in BaaN VI, but does exist in BaaN IV in the Maintain BOM session.
Hello YSOVVA,
I am on BaaN 4C4, Unix environment.
I have tried using the function but was really not clear about the usage,
It behaved strangely, after using this function my field though being an input field was invisible on the form, I could not edit it.
Can you please tell me more about this function. My requirement is an editable field in the view section common for all occurences in the type 3 form.
Best regards,
Niraj Kakodkar
Hitesh Shah
24th November 2010, 18:25
Normally all view fields have to be active main table index field . A form field should be handled using to.field function.
NirajKakodkar
25th November 2010, 05:32
Hello Hitesh,
I agree all view fields are to be table index fields, but my requirement is slightly different, I need my editable field to be in the view section, it is a description kind of field to be entered manually, The field will have common value for all the occurences.
I just need it to appear in view section of the form, currently I am using some workaround to update all the occurences with the value but if there is a function like single.fields.on.mocc.form(), I will be really interested in knowing about it, I tried it but it behaves very differently.
Best Regards,
Niraj kakodkar
sameer.don
25th November 2010, 06:36
Same function I had used for couple of customizations. And I observed the improper behavior as mentioned by Niraj.
The single occ field on the form gets enabled when we try to edit any of the records, i.e. when command modify.set executes. Otherwise fields will be disabled, in fact, it doesn't appear on the form after saving records.
There are few baan standard sessions (eg. ticst0101m000 "Enter Material Issue for production order"), where this function has been used for showing editable single occurrence fields (which are not part of index), at the bottom of form having Form Type 3. And you can observe the same behavior on these sessions too.
I believe that there is no satisfactory solution for this, as the function exhibits a functionality that is against standard Baan behavior of Form Type 3
But, it will be a great help if anyone can suggest solution.
Thanks
NirajKakodkar
25th November 2010, 06:56
Thanks Sameer, that was useful .