imoree Posted February 29, 2012 Posted February 29, 2012 Hello Everyone; I have never had a reason to do this, but now i do. I have some repeating fields that store global storage for questions being asked. In my form , i have another repeating fields for the answers. NOw when user is finished answering questions i am confused as to how to print this via a list as the questions are quite long>! I want just the header to have user & question / answer date In the body i want Question [1 ] Answer [1] -------------------------------- Question [2 ] Answer [2] _______________________ etc But i don't know how to do that! Calculation repeating field, script that loops through the records and creates another table to show the records? help with this would be awesome. thanks, -i
bcooney Posted February 29, 2012 Posted February 29, 2012 I don't understand your structure. Why wouldn't each question (parent) and answer (join rec) be a record? Question->Answer<-Responder
imoree Posted February 29, 2012 Author Posted February 29, 2012 I don't understand your structure. Why wouldn't each question (parent) and answer (join rec) be a record? Question->Answer<-Responder Questions are GLOBAL 0- they dont change Answers are Local to the record ID = ID all i would like to do is have them print per childID. in a list view report. -thanks
comment Posted February 29, 2012 Posted February 29, 2012 I have never had a reason to do this, but now i do. No, you don't. http://fmforums.com/forum/topic/45972-another-survey-question/
imoree Posted February 29, 2012 Author Posted February 29, 2012 No, you don't. http://fmforums.com/...urvey-question/ Why are you so Meticulous with relationships! I guess i will have to do a "CORRECT" relationship then.. Thanks...
comment Posted February 29, 2012 Posted February 29, 2012 Why are you so Meticulous with relationships! Because it eliminates problems down the line - such as the one presented here. Unless you fix your structure, you must place each repetition individually on the layout as a merged field. That alone should convince you - but if not, remember that it would only solve one problem out of many more you would run into.
imoree Posted February 29, 2012 Author Posted February 29, 2012 Because it eliminates problems down the line - such as the one presented here. Unless you fix your structure, you must place each repetition individually on the layout as a merged field. That alone should convince you - but if not, remember that it would only solve one problem out of many more you would run into. got ya. - thank you for the reminder...
bruceR Posted February 29, 2012 Posted February 29, 2012 Note that the virtual list technique can "point" to repeating fields and thus allow sorting, omitting, finding, printing of repeats with considerable flexibility. But a normalized data structure is the better solution.
imoree Posted February 29, 2012 Author Posted February 29, 2012 Note that the virtual list technique can "point" to repeating fields and thus allow sorting, omitting, finding, printing of repeats with considerable flexibility. But a normalized data structure is the better solution. Is there any possibility of a demo ? or a link? i thought so, just dont know how yet. -i
bruceR Posted February 29, 2012 Posted February 29, 2012 See attached. Posted here a while after 11 came out I believe. Bruce Portal_Repeats.fp7.zip
imoree Posted February 29, 2012 Author Posted February 29, 2012 See attached. Posted here a while after 11 came out I believe. Bruce Portal_Repeats.fp7.zip thanks a million.. Hard to search this forum for some reason.
bruceR Posted February 29, 2012 Posted February 29, 2012 And by the way. Be sure to try editing the data in the "Description" field in the portal. Note that this is a calculation field. You can't edit calculation fields. Or - can you? Your keystrokes in the calc field are captured by a script trigger and sent to the associated repeating field. Look at the script trigger attached to the field. You can also edit global repeating variables ( $$var[N]) in the same way. Requires FM11.
imoree Posted February 29, 2012 Author Posted February 29, 2012 And by the way. Be sure to try editing the data in the "Description" field in the portal. Note that this is a calculation field. You can't edit calculation fields. Or - can you? Your keystrokes in the calc field are captured by a script trigger and sent to the associated repeating field. Look at the script trigger attached to the field. You can also edit global repeating variables ( $$var[N]) in the same way. Requires FM11. This gem will be studied . Amazing stuff here .. thanks BruceRobertson...
imoree Posted March 5, 2012 Author Posted March 5, 2012 After doing research and pulling this file apart, i am still unsure of how i would print ( get the Repeating fields ) in a vlist in order to print? THe only thing i can see is how by creating a clone table with RepeatField[index], i am able to create the virtual table in order to "GRAB THE DATA" without affecting original data. Is there a way perhaps that using the Repeat[index] i can somehow place that in the Getvalue( Repeat [index] , [n] ) - as you can see i don't know how. Any help would be greatly appreciated. thanks -i
bruceR Posted March 5, 2012 Posted March 5, 2012 Your question is hard to understand. The example already does what you asked for. What exactly is your question? Keep studying.
imoree Posted March 5, 2012 Author Posted March 5, 2012 Your question is hard to understand. The example already does what you asked for. What exactly is your question? Keep studying. What it does is grabs the repeating fields and puts them in the web viewer using your 2 CF;s and then puts the data in a portal. you have given the option to EDIT via the REPEAT[index] fields using your "edit via portal" script. What i was trying to do now, was put the repeating fields form the Array Table ( VIRTUAL LIST TABLE ) and perhaps loop through the Records and create the Getvalue ( repeatingFields ; Index) and create a list view of the data. I will continue studying, but some of what you have done is quite advanced and hard for me to comprehend completely. -i
bruceR Posted March 5, 2012 Posted March 5, 2012 As I said. It already does exactly what you asked for. The FIRST thing it does is get the Nth content of the repeating field and display it in the virtual list table. In ADDITION, it demonstrates several other things; displays the list data in a portal; and extracts the portal contents and displays it in a web viewer. Did you look at the VList layout?
imoree Posted March 5, 2012 Author Posted March 5, 2012 As I said. It already does exactly what you asked for. The FIRST thing it does is get the Nth content of the repeating field and display it in the virtual list table. In ADDITION, it demonstrates several other things; displays the list data in a portal; and extracts the portal contents and displays it in a web viewer. Did you look at the VList layout? Took me some more time, but i get it now. It does exactly that. I only had to change the List view and the zINvoiceID layout = InvoiceID i wanted and it does exactly that. Thank you again. -time helps everything. BruceR.. You rock!!
imoree Posted April 6, 2012 Author Posted April 6, 2012 Took me some more time, but i get it now. It does exactly that. I only had to change the List view and the zINvoiceID layout = InvoiceID i wanted and it does exactly that. Thank you again. -time helps everything. BruceR.. You rock!! Just an update. Virtual list technique is not as easy as i thought! I will never quit though..
Recommended Posts
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