Raybaudi Posted April 3, 2006 Posted April 3, 2006 Hi all there is an easy way to auto-enter, on new record creation, a value (for example: 1) into all the rep of a repeating field ? (without using an Event plugin)
Raybaudi Posted April 3, 2006 Author Posted April 3, 2006 The simpler way I found is to: 1) make a number field (autoEnter) with option of Auto-Enter a value 2) make a calculation repeating field with calc: Extend ( autoEnter )
Søren Dyhr Posted April 3, 2006 Posted April 3, 2006 I found this kind of simi-recursivity interesting too, when I stumbled over it by accident some days ago. But be warned I saw weird responses from the calc when I tried to make it stored... http://fmforums.com/forum/showpost.php?post/200004/ Similar with your example - try to set the "update" feature on the autoenter, and it stops functioning. --sd
Raybaudi Posted April 3, 2006 Author Posted April 3, 2006 Hi Soren there isn't anything recursive, neither semi-recursive, into the way I found ! Can you apply your calc to my situation ? (sorry, but sure I didn't understand...)
Søren Dyhr Posted April 3, 2006 Posted April 3, 2006 Alright there is no stop value, but Extend( works with all rows in the repetition, but because the first value already contains a value will nothing happen to it, while the second and third row doesn't contain anything and get's updated. I call it semi-recursive due to the fact that first row is considered as well internally. If you however enter something in row 3 is nothing going to happen, because Extend( apparently only works one way ...or only uses first values. With my example, that came from being irritated over littering a base with an excess number of fields, when a calculated repeating field apparently not bleeps when adressing a different repetition in the same repeating field. What I did was to split a multiline-thingy over the repetitions for some repeated identical trimmings, where nested substitute would have made the result wrong. Much to my surprice was it posible to forward the result up to first repetition, so the remaining lines were invisible to the user - if the field was stored did the result keep previous value until the record was committed twice, while unstored fields wobble back and forth until a balance is established (...perhaps more recursive than yours??) --sd
Raybaudi Posted April 3, 2006 Author Posted April 3, 2006 There is something that I'm missing... BTW I found a better way: a lonely repeating field (autoEnter) with option of auto-enter data = 1 and calc: Case( IsEmpty(autoEnter);Extend(autoEnter); autoEnter ) Edit: Try to set the option of autoenter a serial number The result will be surprising ! Try the surprise ! SurprisingSerial.zip
Raybaudi Posted April 4, 2006 Author Posted April 4, 2006 ... and the simplest one is: Extend(autoEnter) :D
Søren Dyhr Posted April 12, 2006 Posted April 12, 2006 By the way - I did yesterday find a problem to throw this knowledge after. A friend of mine believes you can systemize the winnings at the horseraces by keeping sufficient track of the events and winnings of each horse. At present do he enter this myriad of tiny informations from a website by hand by investigating the results looking like this into a excell sheet. See how I did it in the attached template, using your discoveries!! What does is that mark the text on the website and copies it into the global field and hit the button next to it... --sd gigies.zip
Raybaudi Posted April 12, 2006 Author Posted April 12, 2006 So we have the first practical use of a "multiple" serial !
Søren Dyhr Posted April 12, 2006 Posted April 12, 2006 Meanwhile have I found another cool use for Extend( again with a repeater where only first rep. is shown and the field is unstored. 1) Integer to binary bitdepth 9 in a field called theTweak: Let(offset=Get ( CalculationRepetitionNumber )-2; Case ( Get ( CalculationRepetitionNumber ) ≠ 1; Mod(Int(Extend ( entry )/2^offset); 2); theTweak[10] & theTweak[9] & theTweak[8] & theTweak[7] & theTweak[6] & theTweak[5] & theTweak[4] & theTweak[3] & theTweak[2] )) --sd
Recommended Posts
This topic is 6853 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now