Mandatory field
- dmitry
- Topic Author
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Viewer
- Offline
- New Member
- Posts: 4
- Thank you received: 0
I did something like that in the past so dont rememeber all details (would have to check) but you can set the field to be mandatory in the very stage of the application launching so the routine - which manipulates the common variable related to the filed definition N(X)- should be attached to VERSION->Aut New Content or Check Rec Rtn.
However as I rememebr it doesn't work in all core applications, especially LD which is special one. I suggest to use different Versions with filed mandatory or not, instead of routine or just use it in local development.
P.
Please Log in or Create an account to join the conversation.
- samuraj
- Offline
- New Member
- Posts: 12
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- saran
- Visitor
you can play with N array as Mr.Viewer said. But a care should be taken before doing that.It will work fine. Change N(fieldno) = 'maxchar.1.' and call REBUILD.SCREEN .
But its is not ADVICEABLE. think twice before doing this.
regards,
saravanan
Please Log in or Create an account to join the conversation.
- dmitry
- Topic Author
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Thanks for your posts. But I tried to play with array N().
After REBUILD.SCREEN field is really highlighted like mandatory, but it is not mandatory in fact. System allows commit record with empty field and doesn't display error message.
It is very strange, because analogous way works for local fields via array T.LOCREF<>.
Please Log in or Create an account to join the conversation.
- saran
- Visitor
i am using same logic that we are using in T.LOCREF for N array and i am calling rebuild.screen. it is working fine in TELNET and DESKTOP i didnt tested in browser. Hope it will work fine in browser also.
below is a sample code:
BEGIN CASE
CASE AF = EB.CUS.ADDRESS
IF COMI THEN
Y.NSTORE = N(EB.CUS.POST.CODE)
N(EB.CUS.POST.CODE) = Y.STORE:'.':'1'
END ELSE
N(EB.CUS.POST.CODE) = '35'
END
END CASE
CALL REBUILD.SCREEN
regards,
saravanan
Please Log in or Create an account to join the conversation.
- samuraj
- Offline
- New Member
- Posts: 12
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- revinath
- Offline
- New Member
- Posts: 17
- Thank you received: 0
You can use an INPUT.ROUTINE
below is a sample code:
Y.PUR.TYPE=R.NEW(IBN.PURCHASE.TYPE)
IF Y.PUR.TYPE EQ '' THEN
ETEXT='ENTER PURCHASE TYPE'
CALL STORE.END.ERROR
END
CALL REBUILD.SCREEN
revinath
Please Log in or Create an account to join the conversation.
- dmitry
- Topic Author
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Thanks for your posts. I think processing in INPUT ROUTINE
is the most appropriate variant in my situation.
Please Log in or Create an account to join the conversation.
- divesh
- Visitor
When Residence NE "MZ" , this field should become non mandatory field.
Please help its urgent
Thanks
Divesh
Please Log in or Create an account to join the conversation.
- Dzuki
- Offline
- Senior Member
- Posts: 53
- Thank you received: 2
If it local field, then you can write validation routine, change in version field from mandatory to the non-mandatory.
In validation just write
if Residence EQ "MZ" and local field="" then error
Please Log in or Create an account to join the conversation.
- sharathnp
- Offline
- Junior Member
- Posts: 30
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- raji
- Offline
- New Member
- Posts: 13
- Thank you received: 2
If you want to set a local refernce filed as a 'mandatory' in version level use the bellow concept in the input routine.
CALL GET.LOC.REF('FUNDS.TRANSFER', 'CONTRACT.NO', LRF.POS) * To get a loc ref field position
T.LOCREF<LRF.POS,2>="FLD.LEN":".1" * To set a loc.ref field as a mandatory
Here 'CONTRACT.NO' is local reference field of FT application.
Please Log in or Create an account to join the conversation.