add subfield by a routine
- Momo
- Topic Author
- Visitor
-
11 years 6 months ago - 11 years 6 months ago #15159
by Momo
add subfield by a routine was created by Momo
Hi Andreas,
Thank you for your answer.
I will expose my problem, I want to create a routine that checks whether the following capture 1 is equal One or Double or Three, if 1 = One then nothing but if 1 = Double then duplicates fields in 2.
I hope you understand me
and thank you for your help.
Best regards
Thank you for your answer.
I will expose my problem, I want to create a routine that checks whether the following capture 1 is equal One or Double or Three, if 1 = One then nothing but if 1 = Double then duplicates fields in 2.
I hope you understand me
and thank you for your help.
Best regards
Last edit: 11 years 6 months ago by Momo.
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
11 years 6 months ago #15161
by jpb
Replied by jpb on topic add subfield by a routine
I know no way to bring empty MV-fields to a version other than defining them with pre-defined index and setting EXPANSION = NO, e.g.
FIELD.NO RELATION.CODE-1
EXPANSION NO
FIELD.NO RELATION.AU.CLIENT-1
EXPANSION NO
FIELD.NO RELATION.CODE-2
EXPANSION NO
FIELD.NO RELATION.AU.CLIENT-2
EXPANSION NO
etc.
So bring the maximum fields you need to your version, define them as NO-INPUT and change this via a routine when number of signatures is changed . . .
As an alternative it might work to pre-populate the MV-fields in the routine, do REBUILD.SCREEN and attach routine to verify that the fieldvalue is changed.
FIELD.NO RELATION.CODE-1
EXPANSION NO
FIELD.NO RELATION.AU.CLIENT-1
EXPANSION NO
FIELD.NO RELATION.CODE-2
EXPANSION NO
FIELD.NO RELATION.AU.CLIENT-2
EXPANSION NO
etc.
So bring the maximum fields you need to your version, define them as NO-INPUT and change this via a routine when number of signatures is changed . . .
As an alternative it might work to pre-populate the MV-fields in the routine, do REBUILD.SCREEN and attach routine to verify that the fieldvalue is changed.
The following user(s) said Thank You: Momo
Please Log in or Create an account to join the conversation.
- Momo
- Topic Author
- Visitor
-
11 years 6 months ago #15173
by Momo
Replied by Momo on topic add subfield by a routine
Thank you JPB,
I did as you said but I do not know how to change from a routine a NO-INPUT to INPUT
Thank you for your help
I did as you said but I do not know how to change from a routine a NO-INPUT to INPUT
Thank you for your help
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
11 years 6 months ago #15175
by jpb
Replied by jpb on topic add subfield by a routine
In your routine you have to change the T(my.field)<3> to "NOINPUT" or "" depending on your needs and call REBUILD.SCREEN at the end.
Search for NOINPUT (for any date) in the forum, you'll find some detailed hints (also for LOCAL.REF fields...)
Search for NOINPUT (for any date) in the forum, you'll find some detailed hints (also for LOCAL.REF fields...)
Please Log in or Create an account to join the conversation.
- Momo
- Topic Author
- Visitor
-
11 years 6 months ago #15176
by Momo
Replied by Momo on topic add subfield by a routine
Thank you!!! let me try it
Please Log in or Create an account to join the conversation.
- Momo
- Topic Author
- Visitor
-
11 years 6 months ago #15203
by Momo
Replied by Momo on topic add subfield by a routine
Thank you all,
Finally here is what I have developed since the EB.CUS.RELATION.CODE is a field that always gets 11.
NBS.LRF.POS = ''
CALL GET.LOC.REF("CUSTOMER","NB.SIGNATAIRE",NBS.LRF.POS)
NB.SIGNATOR = "EB.CUS.LOCAL.REF,NBS.LRF.POS"
IF COMI NE '' THEN
T(EB.CUS.RELATION.CODE)<3> = 'NOINPUT'
BEGIN CASE
CASE COMI EQ 'UNIQUE'
R.NEW(EB.CUS.RELATION.CODE) = '11'
CASE COMI EQ 'DOUBLE'
R.NEW(EB.CUS.RELATION.CODE) = '11':@VM:'11'
CASE COMI EQ 'TRIPLE'
R.NEW(EB.CUS.RELATION.CODE) = '11':@VM:'11':@VM:'11'
END CASE
R.NEW(EB.CUS.LOCAL.REF)<1,NBS.LRF.POS> = COMI
CALL REBUILD.SCREEN
END
I await any suggestions for improvements to the code
Finally here is what I have developed since the EB.CUS.RELATION.CODE is a field that always gets 11.
NBS.LRF.POS = ''
CALL GET.LOC.REF("CUSTOMER","NB.SIGNATAIRE",NBS.LRF.POS)
NB.SIGNATOR = "EB.CUS.LOCAL.REF,NBS.LRF.POS"
IF COMI NE '' THEN
T(EB.CUS.RELATION.CODE)<3> = 'NOINPUT'
BEGIN CASE
CASE COMI EQ 'UNIQUE'
R.NEW(EB.CUS.RELATION.CODE) = '11'
CASE COMI EQ 'DOUBLE'
R.NEW(EB.CUS.RELATION.CODE) = '11':@VM:'11'
CASE COMI EQ 'TRIPLE'
R.NEW(EB.CUS.RELATION.CODE) = '11':@VM:'11':@VM:'11'
END CASE
R.NEW(EB.CUS.LOCAL.REF)<1,NBS.LRF.POS> = COMI
CALL REBUILD.SCREEN
END
I await any suggestions for improvements to the code
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
11 years 6 months ago - 11 years 6 months ago #15204
by jpb
Replied by jpb on topic add subfield by a routine
How will you handle if your code is changed from not-empty to empty ?
If you maintain any other relation than this "11" the routine has to take into account that there can be values present (meaning scan thru the present values, counting those with 11 and add / remove accordingly).
If you maintain any other relation than this "11" the routine has to take into account that there can be values present (meaning scan thru the present values, counting those with 11 and add / remove accordingly).
Last edit: 11 years 6 months ago by jpb.
Please Log in or Create an account to join the conversation.
- Momo
- Topic Author
- Visitor
-
11 years 6 months ago #15207
by Momo
Replied by Momo on topic add subfield by a routine
In fact it is specic to one type of client and the client code does not change.
If you look at my screenshot above, a duplicate of "Relationship Code" also leads to a duplication of "customer relationship"
the user just has three options "SINGLE" or "DUAL" or "TRIPLE"
If you look at my screenshot above, a duplicate of "Relationship Code" also leads to a duplication of "customer relationship"
the user just has three options "SINGLE" or "DUAL" or "TRIPLE"
Please Log in or Create an account to join the conversation.
Time to create page: 0.041 seconds