SFL Application Help

320 pts.
Tags:
iSeries
RPG
SFLCTL
I have a SFL that has drop/fold capability and application help through out. The problem is when the SFL is in drop mode and additional fields are being displayed, how do I associate help to those fields? I cannot use the HLPID keyword as it's not allowed on the SFL record nor can I use *FLD in the Define Help Area of the SFLCTL record because the field is not in the that record. There must be some way of doing this as I've seen it before.

Answer Wiki

Thanks. We'll let you know when a new response is added.

One solution to this problem is to use the RTNCSRLOC(&RecN &FldN) keyword on the SFLCTL record in the display file definition. If you position the cursor on a subfile field and press a “control key” this keyword will return the Record Name(&RecN) and the Field Name(&FldN) where the cursor was positioned. Then you can use program logic to execute any procedure you need.

This is an example of the DSPF code
<pre>
A RTNCSRLOC(&RECN &FLDN)
A RECN 10A H
A FLDN 10A H
</pre>

Then you’d need the RPGLE too!
<pre>
C IF FLDN = ‘EMPF’
C EXSR EMPLOG
C ENDIF
</pre>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following