I have 4 records, North, S E & West. Call this DIR for Direction.
and a yes/no field on each one.
I want to have 4 rows in a grid, and a button on each.
The button is to set that record YES (N,S,E or W), and all others NO.
I have to pass in the context for the rec I'm on.
DIR.yesno = "Yes" This correctly assigns that DIR record to Yes.
This correctly finds the "other" 3 recs:
FIND DIR WHERE DIR <> this.DIR IN BATCHES OF 1
but
DIR.yesno = "No" does not execute correctly.
Using LOG2 CONTEXT and the Logger, I can see that the Original Passed in DIR is still in Context, PLUS the 3 that were found.
Each of the 3 iterations operates on
a) the original passed in DIR, and
b) the "other" 3 records, 1 in each pass.
I can't seem to shake that 1st DIR record that already got set to "Yes", and now gets set back to "No' (3 times in fact).
confused.
--> JaymerTip
How to clear a value in all recs but the one I'm on?
How to clear a value in all recs but the one I'm on?
Last edited by Jaymer on Sat Feb 29, 2020 1:55 am, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: How to clear a value in all recs but the one I'm on?
A long time ago, maybe 3 years ago I ran into something like that. If my memory served me right, you need to have a separate process when you're making the update. Another words, you need to create a loop that for each loop Aware creates a process, updates the record, commits the record and closes the process and goes to next record. The update process will then run 4 time after the Batches of 1.
I have kinks of forgotten simulating loops in Aware, but I did it and works.
I have kinks of forgotten simulating loops in Aware, but I did it and works.
-
- Posts: 7523
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: How to clear a value in all recs but the one I'm on?
OtherDIR.yesno = "No"
Aware IM Support Team