When we apply setrange for customers. How to show from first range to last range through setrange. I tired with CustomerRec.FINDfirst then its showing 10000 and with findlast its showing 90000. How to show from 10000 to 90000 continuously? Please help me.
CustomerRec.SETRANGE("No.",'10000','90000');
IF CustomerRec.FINDSET THEN
MESSAGE('%1',CustomerRec."No.")
ELSE
MESSAGE('Not Found')
Thanks
*This post is locked for comments
Thank you so much guys.
Hello Madhavi,
Agree with [tag:Mohana]
you need to use REPEAT UNTIL
//CustomerRec.SETRANGE("No.",'10000','90000'); Instead of setrange use setfilter.
CustomerRec.SETFILTER("No.",'%1..%2','10000','90000');
IF CustomerRec.FINDSET THEN BEGIN
REPEAT
MESSAGE('%1',CustomerRec."No.");
// Here is your all records.
UNTIl CustomerRec.Next = 0;
END ELSE
MESSAGE('Not Found');
you need to use REPEAT UNTIL
CustomerRec.SETRANGE("No.",'10000','90000');
IF CustomerRec.FINDSET THEN
REPEAT
MESSAGE('%1',CustomerRec."No.");
UNTIl CustomerRec.Next = 0;
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156