Newbies conexus Posted April 1, 2005 Newbies Posted April 1, 2005 We are using repeating fields over our solutions, but we found that we didn
Ugo DI LUCA Posted April 1, 2005 Posted April 1, 2005 You can't do it that way actually. You may use one of the three workarounds : 1) a loop in a repeating field set with a correct tab order and stop the loop when Get(ActiveRepetitionNumber)= TheParameter, then proceed with SetField[(empty);TheValue] 2) change your repeating field to a calculated repeating field and use the Get(RepetitionCalculationNumber) to grab the position where TheValue should be set. cRepeat*** = Case(Extend(TheParameter)=Get ( CalculationRepetitionNumber ) and not IsEmpty(Extend(TheValue));Extend(TheValue);cRepeat) 3) use a new occurrence of the Base Table linked to the original from any text id you may have, and set the repeating field to be a lookup from the previous calculation in 2) . SetField[MyParameter;N] SetField[iD;ID] CommitRecord/Request ***the not IsEmpty(Extend(TheValue)) would make sure an empty value cannot be set. If this condition can be valid, then remove it from the calc so that you can delete a specific "row" if needed. Or use "ClearThisRep" as a marker so that if TheValue = "ClearThisRep", it will be deleted. HTH
Newbies conexus Posted April 1, 2005 Author Newbies Posted April 1, 2005 Thanks for your solution. I take the first way. Sometimes, i can
Søren Dyhr Posted April 1, 2005 Posted April 1, 2005 I take the first way Hopefully not, stop using repeaters at once!!! i can
Ugo DI LUCA Posted April 7, 2005 Posted April 7, 2005 Yes, this was part 4 I ommited... Hopefully, Soren is paying attention
jim lee Posted April 8, 2005 Posted April 8, 2005 Thanks comment, for pointing me to this thread. So,repeating fields are kinda' discouraged? I needed a stack and thought a repeating field would be just the ticket. And as you know I ran ino the same "I can't write to a calculated index" thing as well. Just to get things going I did a nasty hack.. if [index=1] SetField[stack[1],MyParameter] else if [index=2] SetField[stack[2],MyParameter] else if... On and on, actually up to 20. Yuch what a mess! But it got me up and running. For reading the stack I used a calculated field. GetRepetition ( stack ; index) "they're breaking 1NF which dictates one fact per field." Not being a database person, this may be a really obtuse question but; Why is this something that shouldn't be broken? -jim lee
comment Posted April 8, 2005 Posted April 8, 2005 Repeating fields are a tool. Like any tool, it depends on the task at hand if the tool fits or not. Using repeating fields to store "real data", i.e. data that needs to be reported, summarized, extracted, etc., is generally a bad idea. The classic example is an invoice with repeating fields to hold invoice items. Any kind of reporting on the items (e.g. how many of #23 widgets have we sold this year?) becomes virtually impossible. Repeating fields can ve VERY useful for auxiliary data, such as calculating multi-line keys, or storing values used for other calculations, and certainly for displaying data.
Recommended Posts
This topic is 7171 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