How to use Validate Record embeds (Range Checking or Filter Checking)
How to use Validate Record embeds (Range Checking or Filter Checking)
(OP)
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
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
RE: How to use Validate Record embeds (Range Checking or Filter Checking)
RE: How to use Validate Record embeds (Range Checking or Filter Checking)
RE: How to use Validate Record embeds (Range Checking or Filter Checking)
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
RE: How to use Validate Record embeds (Range Checking or Filter Checking)