July 23, 200916 yr Hi, I am using repeating fields in my project.i want to delete repeating fields row by row instead of deleting all the record. it's possible in fm to delete repeating fields row by row.plz help me . Thanks, John
July 23, 200916 yr Beyond you need to explain why your repeating fields not are calc'fields only ... and honestly only have proper deployment when used to utility purposes only. http://www.kevinfrank.com/download/2009/clear-repeating-field-via-lookup.zip But I need to caution you against using repeaters if the same matter could be solved via genuine relations, hence my expectation of calc'fields only when dealing with repeating fields. --sd
July 23, 200916 yr Do you mean Portal Records? Why not Post a copy of your file, so that we can better understand your question. Lee
July 24, 200916 yr Author no the repeating fields that i am using is not the calculation fields. i am using it vertically and i want to delete it row by row.
July 24, 200916 yr What you just said is no surprise to me, it's what I already took for granted. What I didn't see though is why you use repeters at all, since they are a bad substitute for a one to many relation, what do they solve that can't be done with a portal and a few related tables. This means you have to cough up a plausible context and purpose, and not just rephrase the original question, because the likeliness of giving you an answer just in the vicinity of what you wish ... is not that big. Explain your love affair with repeaters - please! By all means stop asking abstract open ended questions, if what you need is the opposite of an generalized and not particular precise answer. --sd
July 24, 200916 yr I am using repeating fields in my project John, repeating fields are not good for data. As Søren says, a standard relationship is truly the way to go.
July 24, 200916 yr Author thanks all for ur suggestion now i will use portal instead of this.but tell me for what reasons repeaters r there??? Thanks, John
July 24, 200916 yr Before fm3 wasn't fm relational ... and even though thats back in the beginning of the 1990'ies have the backwards compatibility been kept ... but there are as well developers who can do incredible things with them, but all these purposes fall in the "utility sector" for temporarily massaging very specific data. As a rule of thumb would I suggest you abide to "the users have no access to write data to them" --sd
July 24, 200916 yr I'm certainly in agreement with the advice above (use a portal to a related table rather than a repeating field) but I think your original question deserves an answer. When you say "Delete repeating fields row by row", my interpretation of this goes something like this: Say you have a repeating field with (for example) 10 repetitions. Each of those has some data in it. You want to zero out (for example) repetition #6, and have all of the repetitions below it shift one entry up. You can do this with a looping script. Set a variable $count equal to the targeted repetition number -- the one you want to "delete" -- and then Set Field (yourfield[$count]) to the value yourfield[1+$count]. Then increment $count and loop (put an "exit loop if" condition to trigger when $count is the maximum number of repetitions. After exiting the loop remember to blank out the final one. I've never actually tried this but I think it should work. From a design perspective using repeaters like this is kludgy and awkward, but if you already have a working solution it might be better to just hold your nose and do it this way rather than redesign everything from the ground up.
July 24, 200916 yr but I think your original question deserves an answer. It does, hence the reference to the Kevin Frank template as if provisions doesn't exist :qwery: --sd
July 24, 200916 yr I guess I'm missing something in the Kevin Frank template -- how does that show "deleting row by row"? The original question didn't say anything about lookups.
July 24, 200916 yr Sorry I lost track of the original premises. Since the OP is on fm10 is there a welcome simplification possible: Set Variable [ $tt; Value:"cleartheRepeater::aField" & "[" & Get ( ScriptParameter ) & "]" ] Set Field By Name [ $tt; Case(0;0) ] Where the script parameter then selects the repeater to clear. --sd
Create an account or sign in to comment