Set ENQ.SELECTION in VERSION
- woolala
- Topic Author
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
I input a local multi group value in VERSION named RISKINSTITUTION and RISKWEIGHT.
The RISKWEIGHT will change according to the value of RISKINSTITUTION .
e.g.
if RISKINSTITUTION.1 equals 'FITCH', RISKWEIGHT.1 may have 'AA+' 'AA' 'AA-' ....
if RISKINSTITUTION.2 equals 'MOODY', RISKWEIGHT.2 may have 'Aaa' 'Baa3' 'Baa' ...
PGM.NAME.VERSION.. SECURITY.MASTER,TEST01
------------------------------------------------------------------------------
13.13 FIELD.NO....... LOCAL.REF-22.1 XX<RISKINSTITUTION
14.13 COLUMN......... 1
15.13 EXPANSION......
16.13 TEXT.CHAR.MAX.. 16
17.13. 1 TEXT........
18.13. 1 TXT.040..078
19.13. 1 TXT.079..117
20.13. 1 TXT.118..132
21.13 ENRICHM.CHAR... 9
...
13.14 FIELD.NO....... LOCAL.REF-23.1 XX>RISKWEIGHT
14.14 COLUMN......... 1
15.14 EXPANSION......
16.14 TEXT.CHAR.MAX.. 16
17.14. 1 TEXT........
18.14. 1 TXT.040..078
19.14. 1 TXT.079..117
20.14. 1 TXT.118..132
21.14 ENRICHM.CHAR... 9
22.14 TABLE.COLUMN... 1?33?
23.14 TABLE.LINE..... 14
24.14 ENRI.COL.......
25.14 PROMPT.COL.....
26.14 RESERVED05.....
27.14 RESERVED04.....
28.14 RESERVED03.....
29.14 RESERVED02.....
30.14 RESERVED01.....
31.14. 1
32.14. 1 TOOL.TIP....
33.14 DROP %LB.RISK.RATING LB.RISK.RATING
34.14 ENQ.SELECTION.. RISKINSTITUTION EQ RISKINSTITUTION
But when I changed RISKINSTITUTION value, RISKWEIGHT didn't change anything.
I using R09 desktop, Is there anything I missed??
Please Log in or Create an account to join the conversation.
- heikeedwin
- Offline
- User is blocked
- Posts: 3
- Thank you received: 0
Or, change the LOCAL.REF-22.1 to RISKINSTITUTION in field.no definition.
Never tried but, seems to be confusing to get the field value.
Please Log in or Create an account to join the conversation.
- woolala
- Topic Author
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
I tried change the LOCAL.REF-22.1 to RISKINSTITUTION in field.no definition.
But it shows error 'Incorrect Format For LOCAL.REF Field'
Maybe I know why you confused...
Because I have a same field named RISKINSTITUTION in Application LB.RISK.RATING
So in ENQ.SELECTION it means "select data in LB.RISK.RATING where LB.RISK.RATING's RISKINSTITUTION equals LOCAL.REF-22.1", not selected itself.
I tried set ENQ.SELECTION as 'RISKINSTITUTION EQ LOCAL.REF-22.1' too, but it still shows error
Please Log in or Create an account to join the conversation.
- premat_mil
- Offline
- New Member
- Posts: 6
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- armin
- Offline
- Elite Member
- “So long - and thanks for all the fish!”
- Posts: 300
- Thank you received: 57
But when I changed RISKINSTITUTION value, RISKWEIGHT didn't change anything.
Do you expect the value of RISKWEIGHT to be changed or "just" the available values in the drilldown ?
For the contents of the drilldown your settings should more or less work, to change the value directly you have to use a validation routine attached to RISKINSTITUTION updating RISKWEIGHT.
To use RISKINSTITUTION instead of LOCAL.REF-22.1 try with RISKINSTITUTION-1.
Maybe you have to define multiple pairs for RISKINSTITUTION/RISKWEIGHT with -1 -2 etc. and set EXPANSION to NO to make it work (and use the corresponding -n also in the ENQ.SELECTION).
Please Log in or Create an account to join the conversation.
- woolala
- Topic Author
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
I created a routine and put it on BUILD.ROUTINE in ENQUIRY(%LB.RISK.RATING)
And it works perfectly.
SUBROUTINE E.RISK.ENQ(ENQ.DATA)
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_ENQUIRY.COMMON
$INSERT I_F.SECURITY.MASTER
$INSERT I_F.LR.SECURITY.MASTER
FN.SM = 'F.SECURITY.MASTER'
F.SM = ''
CALL OPF(FN.SM,F.SM)
ENQ.DATA<2,1> = 'RISKINSTITUTION'
ENQ.DATA<3,1> = 'EQ'
ENQ.DATA<4,1> = R.NEW(SC.SCM.LOCAL.REF)<1,SCM.LR.RISKINSTITUTION,AS>
END
Thanks all for suggestion.
Please Log in or Create an account to join the conversation.
- VK
- Offline
- Platinum Member
- Globus:G09-G13|TAFC:R05-R23|TAFJ:R19,R23:test
- Posts: 1116
- Thank you received: 150
Firstly, you don't need to open the SECURITY.MASTER.
Secondly, R.NEW is unavailable in a drop-down build routine.
You can try to pass the value of RISKINSTITUTION via named COMMON.
Cheers
VK
Please Log in or Create an account to join the conversation.
- woolala
- Topic Author
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
'You can try to pass the value of RISKINSTITUTION via named COMMON'
can you explain it more clearly or give me some code?
Actually, I can get and pass any R.NEW values while clicking dropdown button in VERSION.
I have tried uploading images several times, but failed.
If I can upload some images, maybe I can show you something interest.
Please Log in or Create an account to join the conversation.
- VK
- Offline
- Platinum Member
- Globus:G09-G13|TAFC:R05-R23|TAFJ:R19,R23:test
- Posts: 1116
- Thank you received: 150
let's sum up your task.
When you amend the field RISKINSTITUTION, drop-down for the field RISKWEIGHT should take it into account. Is this what you want to achieve?
Cheers
VK
Please Log in or Create an account to join the conversation.
- woolala
- Topic Author
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
Yes you're almost right!
For example, I created a application named RISK.TEST, and it contains data below:
ID RISKINSTITUTION RISKWEIGHT
=================================
1 MOODY AA+
2 MOODY AA
3 MOODY AA-
4 MOODY A+
5 MOODY A
6 FITCH BB+
7 FITCH BB
8 FITCH BB-
9 FITCH B+
10 FITCH B
In SECURITY.MASTER would contain two local fields => RISKINSTITUTION & RISKWEIGHT
RISKINSTITUTION and RISKWEIGHT are multi-group values.
When I input "MOODY" in RISKINSTITUTION.1, and RISKWEIGHT.1 will contains AA+ / AA / AA- / A+ / A
and next expand another new group RISKINSTITUTION.2 / RISKWEIGHT.2
When I input "FITCH" in RISKINSTITUTION.2, and RISKWEIGHT.2 will contains BB+ / BB / BB- / B+ / B
But RISKWEIGHT.1 still remains AA+ / AA / AA- / A+ / A
Please Log in or Create an account to join the conversation.
- VK
- Offline
- Platinum Member
- Globus:G09-G13|TAFC:R05-R23|TAFJ:R19,R23:test
- Posts: 1116
- Thank you received: 150
Cheers
VK
Please Log in or Create an account to join the conversation.
- woolala
- Topic Author
- Offline
- Junior Member
- Posts: 20
- Thank you received: 0
SUBROUTINE E.RISK.ENQ(ENQ.DATA)
$INSERT I_EQUATE
$INSERT I_COMMON
$INSERT I_ENQUIRY.COMMON
$INCLUDE TEM.BP I_F.RISK.TEST
$INCLUDE I_F.LR.SECURITY.MASTER
$INCLUDE I_F.SECURITY.MASTER
GOSUB INIT
GOSUB PROCESS
******************************************************************
INIT:
*FN.SM = 'F.SECURITY.MASTER'
*F.SM = ''
*CALL OPF(FN.SM,F.SM)
*FN.RR = 'FBNK.RISK.TEST'
*F.RR = ''
*CALL OPF(FN.RR,F.RR)
RETURN
******************************************************************
PROCESS:
LOCATE 'RISKINSTITUTION' IN ENQ.DATA<2,1> SETTING ENQ.POS ELSE ENQ.POS=''
IF ENQ.POS NE '' THEN
END
ELSE IF R.NEW(SC.SCM.LOCAL.REF)<1,SM.LR.RISKINSTITUTION,AS> NE '' THEN
ENQ.DATA<2,1> = 'RISKINSTITUTION'
ENQ.DATA<3,1> = 'EQ'
ENQ.DATA<4,1> = R.NEW(SC.SCM.LOCAL.REF)<1,SM.LR.RISKINSTITUTION,AS>
CALL REBUILD.SCREEN
END
RETURN
******************************************************************
END
Please Log in or Create an account to join the conversation.
- heikeedwin
- Offline
- User is blocked
- Posts: 3
- Thank you received: 0
Or to AUTOM FIELD, which I think won't fit your requirements.
Please Log in or Create an account to join the conversation.