× Discuss about Archiving, Close of Business, Delivery Setup, Security Management System, Global Processing etc…

Version field enrichment

  • anpal
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago #16911 by anpal
Version field enrichment was created by anpal
Hi,
Can anyone please explain how field enrichment works?
What I know (please correct me if I'm wrong) is that for fields of an Application XXX that are set as checkfile on Application YYY, if I use Version field ENRICHM.CHAR then the field defined in SS (DEFAULT.ENRICH) of Application YYY is shown. If DEFAULT.ENRICH field is not set in Application YYY then field 1 is shown.

My questions are:
1) Can I change the default enrichment without changing the SS field DEFAULT.ENRICH?
2) How do I add enrichment for fields that are not set as checkfile on an application?
i.e. I have a version and for field AAA I want it to be a dropdown. So I use field DROP.DOWN using an Enquiry. when I select the record I want how do I set enrichment, and of which field?

I am using Desktop release R13.
Thanks

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
9 years 2 months ago #16912 by jpb
Replied by jpb on topic Version field enrichment
1) no (except for local fields)
2) Create a validation routine and attach it to the field.
In the routine assign the desired value to COMI.ENRI.
e.g.:
SUBROUTINE V.SET.ENRI.FOR.XXX
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.XXX
IF COMI = "" THEN
ETEXT = "no value selected"
CALL STORE.END.ERROR
END
CALL DBR("XXX":FM:xxx.desired.field, COMI, DESCR)
COMI.ENRI = DESCR
RETURN
The following user(s) said Thank You: anpal

Please Log in or Create an account to join the conversation.

  • anpal
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago #16946 by anpal
Replied by anpal on topic Version field enrichment
Using a routine as you suggested works fine.
Relevant to this, I have a Check record routine where I default some fields.
One of the fields is the one taking values from EB.LOOKUP.
Is there a way to have the enrichment in such a case?

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
9 years 2 months ago #16948 by jpb
Replied by jpb on topic Version field enrichment
You can read EB.LOOKUP yourself, key is FIELDNAME * FIELDVALUE, the enrichment is DESCRIPTION

e.g.

LOOKUP.KEY = "EMPLOYMENT.STATUS*" : COMI
CALL F.READ(FN.EB.LOOKUP,LOOKUP.KEY,R.EB.LOOKUP,F.EB.LOOKUP,'')
COMI.ENRI = R.EB.LOOKUP<EB.LU.DESCRIPTION>

Please Log in or Create an account to join the conversation.

  • anpal
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago #16949 by anpal
Replied by anpal on topic Version field enrichment
Hi jpb,
This is exactly what I did, I read from EB.LOOKUP and set the COMI.ENRI.
My question was related to this...let me explain it a bit.

Let's say I have 3 fields that are using the above routine, but one of these fields has a defaulted value (from a check routine).
In this case when the user inputs values in the 2 fields then routine runs and sets the enrichment.
But the third field already has a value so the validation routine will not run to set the enrichment.
So the question is : "How can I set enrichment on this field that already has a value?"

Sorry, I was not clear before.
Thanks

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
9 years 2 months ago #16950 by jpb
Replied by jpb on topic Version field enrichment
Have you tried using the R.NEW(xxx) instead of COMI ?

IF AF = xxx THEN
IF COMI THEN
R.NEW(xxx) = COMI
END
LOOKUP.KEY = "EMPLOYMENT.STATUS*" : R.NEW(xxx)
....

Please Log in or Create an account to join the conversation.

  • anpal
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago - 9 years 2 months ago #16951 by anpal
Replied by anpal on topic Version field enrichment
Please see attached file with screens to see my problem.




Thanks
Last edit: 9 years 2 months ago by anpal. Reason: to add attachment

Please Log in or Create an account to join the conversation.

  • anpal
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago - 9 years 2 months ago #16952 by anpal
Replied by anpal on topic Version field enrichment
This is the Version when it is loaded. Based on the @ID some initial values are being defaulted (using a check record routine). You can see below that “Gender” already has a value (but it comes with no enrichment).
If I choose something from the dropdown the enrichment is shown (because the validation routine is executed). The question is, how can I have enrichment when a field already has value? (see Gender)

Attachments:
Last edit: 9 years 2 months ago by anpal.

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
9 years 2 months ago - 9 years 2 months ago #16953 by jpb
Replied by jpb on topic Version field enrichment
You can use REFRESH.FIELD for this. The routine has two parameters :
REFRESH.FIELD.NO    Defines the field, value and sub value to be refreshed;
                     field.multi.sub      e.g. 10.2.1
                     field.multi          e.g. 3.1
                     field                e.g. 5

 FIELD.ENRI          The enrichment that will be set.
                     This value will always be used if passed.
                     Where this argument is null, the enrichment will be set
                     to the CHECKFILE - if there is one.
Last edit: 9 years 2 months ago by jpb.
The following user(s) said Thank You: anpal

Please Log in or Create an account to join the conversation.

  • anpal
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 2 months ago #16954 by anpal
Replied by anpal on topic Version field enrichment
Calling REFRESH.FIELD would be I guess a solution if I could call it after the version loading.
In my case the enrichment had to be ready at the time of loading.
I found a solution to this. I used common variable T.ENRI.
In the check record, for the fields that I had to default their values, I set T.ENRI with appropriate enrichment and it worked.

Thanks for your support

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
9 years 2 months ago #16955 by jpb
Replied by jpb on topic Version field enrichment
REFRESH.FIELD is doing nothing else than updating the correct T.ENRI ;-)

Please Log in or Create an account to join the conversation.

  • Glebus Desktop
  • Glebus Desktop's Avatar
  • Offline
  • New Member
  • New Member
  • I hate T24
More
8 years 6 months ago #18242 by Glebus Desktop
Replied by Glebus Desktop on topic Version field enrichment

REFRESH.FIELD is doing nothing else than updating the correct T.ENRI ;-)


How this will work in browser?

Please Log in or Create an account to join the conversation.

  • anpal
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #18243 by anpal
Replied by anpal on topic Version field enrichment
Maybe it has something to do with whatever else is called during version loading and is causing REFRESH.FIELD not to work.
I'm very positive that if I set manually T.ENRI it works.
At the same line if I use REFRESH.FIELD, the enrichment does not work.

Thanks again for your response.

Please Log in or Create an account to join the conversation.

  • Glebus Desktop
  • Glebus Desktop's Avatar
  • Offline
  • New Member
  • New Member
  • I hate T24
More
8 years 6 months ago #18245 by Glebus Desktop
Replied by Glebus Desktop on topic Version field enrichment
I found solution for browser, simply update OFS$ENRI variable, for example:
IF GTSACTIVE THEN
   OFS$ENRI<FIELD.NO, VALUE.NO, SUBVALUE.NO> = MESSAGE
END

Please Log in or Create an account to join the conversation.

Time to create page: 0.159 seconds