March 17, 200421 yr Hi, I need to create a field repeated for N times, but this N times have to be defined by the user. For instance, in a field named FIELD_1 I insert 5, and automatically FM creates 5 FIELD_2, all of which containg the same content (already defined). Is it possible? Thanks, Version: v6.x Platform: Mac OS X Panther
March 17, 200421 yr Umm... Fields must be set up in advance as part of the database schema, and there's no provision to modify the underlying structure according to user's data entry or selections. It would, however be possible to set up a field with a suitable large number of repetitions and simply populate a given number of them depending on the user's selection (leaving the remaining repetitions blank. But perhaps a better option would be to store related values in a separate file and display them in a portal, rather than using repeating fields. However without knowing a bit more about what it is you are trying to do and why, it is difficult to suggest alternatives.
March 17, 200421 yr Author Hi, I try to explain what kind of dB I need. I have slides to catalogue, they are defined with a SERIES number, and with a LETTER. For each record, SERIES and LETTER are different. For instance, for a certain slide, I have 5 SERIES ( 1 to 5) each containing 6 LETTER ( from A to F). I want to that FM creates N LETTER field, where N is defined from the number put in SERIES. For instace, what I would like sounds like: SERIES 3 LETTER 4 1 ABCD 2 ABCD 3 ABCD Moreover, I want see them as checkbox -this should not be a problem, as I can change Format field - so that I can select 1 or more letters. Is it possible that, when all the letters of a certain series are checked, automatically also the series number is checked? I think I could define something like row and column, but the numbers should be defined by the user. Thanks
March 17, 200421 yr Based on your description, I suggest that you consider using checkbox fields to record the details of the slides, and define the the Series field as an auto-enter calculation to fill in the appropriate series number when the letter values have all been selected. I've attached a very quick demo which shows a way that this might work. See what you think... slidecheck.zip
March 17, 200421 yr Author It sounds good, but it's a bit different from what it's my mind :-)) With your demo, every record indicate 1 series, while I would like that every record includes a number of SERIES defined by user. For instance: In record #1 I want 6 SERIES with 5 LETTER each In SERIES I put 5; in LETTER 4, and what I obtain should be: 1 ABCD 2 ABCD 3 ABCD 4 ABCD 5 ABCD In record #2 I want 3 SERIES with 6 LETTER 1 ABCDEF 2 ABCDEF 3 ABCDEF And so on. About the second part of my question - checking the series when all the letters are checked - it works perfectly!! Thanks a lot for you patience !
March 17, 200421 yr Ok, well to do that, I certainly suggest that you consider using portals rather than repeating fields. See attached a revised example that uses a couple of scripts to populate a portal along the lines of what you've described. SlideMaster.zip
March 17, 200421 yr Author Uao!! Now it is quite perfect! That's really what I was thinking. Just a couple of other questions ( probably stupid...): _ If I change the number of a series and then press create, it adds new numbers to the existing ones, while it should just modify them _ what is the meaning of Slidedata??? I mean, I think that it taks memory of the checked letter and series, but could I use it for more? Thanks a lot, you helped me very much!!! Ciao Version: v6.x
March 18, 200421 yr giacomo said: _ If I change the number of a series and then press create, it adds new numbers to the existing ones, while it should just modify them ? I'm not sure what you mean here. In your earlier posts you were indicating that if the series number entered was five, you wanted five entries, whereas if the number entered was three you wanted three and so on. In light of that, I'm not sure how you would expect to change the list if the starting number is increased other then to add to the list so that its length corresponds to the new number. giacomo said: _ what is the meaning of Slidedata??? I mean, I think that it taks memory of the checked letter and series, but could I use it for more? Yes, the file setup is relational, and the data for each line which shows in the portal in the main file, is stored (each on a separate record) in the slidedata file. You could use slidedata to store additional fields, or you could establish additional related files, depending on the nature of the information to be stored.
Create an account or sign in to comment