April 10, 200223 yr My layout shows a list of records. I need to omit all records on that list that have a certain value in a field. I wrote a script for that: go to first record loop if fieldX = AAA omit record end if go to record next end loop
April 10, 200223 yr Author sorry, posted too quick. Anyway, this script ommits only every other record. i have to perform the script many times for all my records to be omited. Every time i perform it a little more are omitted untill they finally get all omited. if i replace the omit record step by a set field step, all my records get updated correctly. The problem is just with the omit record. Any Idea where it might come from? Thanks, David
April 10, 200223 yr Hello David! I might be able to help you with that, since I ran into this problem once, too. You can do this two ways, although I suggest doing it the last way I explain: To get it to work the way you have it now, it needs to be like this: Go to first record Loop If [FieldX = AAA] Omit record Go to Record/request/page [Next] Else If [status(CurrentRecordNumber)=Status(CurrentFoundCount)] Omit Record Exit Loop If ["1"] End If End If end loop I haven't tested it yet, but im pretty sure it will work this way. Its kinda bulky, though. I would suggest this: Enter Find Mode [] Set Field [FieldX , "AAA"] Perform Find Omit Record If [status(CurrentFoundCount)=0] Show Message ["No records matched your request"] Show All Records Hope that does it for ya!! Ken
April 10, 200223 yr Oops: I caught a mistake upon proof reading the post: After the "Set Field [FieldX, "AAA"]" step, put the "Omit Record" step. Then have the perform find. That should work. I tried it myself. Ken
April 10, 200223 yr Oh, yeah and one more thing: Take out the "IF [status(CurrentFoundCount) = 0]" step. I accidentally left it in there from another script I was working on. Sorry. This is a perfect example of bugs from not checking your scripts!! Learn from my negligence Ken
Create an account or sign in to comment