Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use Validate Record embeds (Range Checking or Filter Checking)

Status
Not open for further replies.

berthoud

Technical User
Oct 31, 2010
51
FR
Hello every body,

I don't understand how using these embeds.

I need to add a filter in a browse, but the field I have to filtered is not a field of the record, but the result of a calc in "format an element of the browse queue".


For exemple :

"MyCondition" (S1) is the result of a calc/condition in "format an element of the browse queue".

I add "MyCondition" in the FileBoxFormat => the browse is OK and the good value for "MyCondition" is displayed for each line of the browse.

Now, I want to display only records where the value of "MyCondition" is 'Y'

I kwow I had to uses "Validate Records" embeds but I don't know how to do!

Thank you very much if you could help me

best regards

 
Hello,

The if condition returning record:filtered will filter out the corresponding record. The snippet below shows where about to put your condition.

In short returning a record:fitered will filter out the record in process.

Best Regards

Samir

BRW1::RecordStatus BYTE,AUTO
! [Priority 8500]

! End of "Browser Method Data Section"
CODE
! Start of "Browser Method Code Section"
! [Priority 2500]

! Parent Call
ReturnValue = PARENT.ValidateRecord()
! [Priority 5050]
if ~INSTRING('m',CLI:NAME,1,1)
ReturnValue = Record:Filtered
end

BRW1::RecordStatus=ReturnValue
IF BRW1::RecordStatus NOT=Record:OK THEN RETURN BRW1::RecordStatus.
! [Priority 6600]

ReturnValue=BRW1::RecordStatus
! [Priority 9000]

! End of "Browser Method Code Section"
RETURN ReturnValue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top