Triodes Posted October 27, 2004 Posted October 27, 2004 Hello, I am trying to make a script collecting data from various records in one DB and copying them to a repeating field in a single record of another DB. Hence the repetition number will vary. So far as I can tell I can only set the repetition to a fixed number while defining the "Set Field" script-step, not a variable that is defined elsewhere. example: DB 1 (pricelist file) #1 0x pots at $40.00 #2 0x pans at $40.00 #3 1x fork at $2.50 #4 2x spoon at $3.00 #5 0x plate at $5.00 DB 2 (quotations file) #1 1x fork $2.50 2x spoon $3.00 The #'s represent records in the DB. So in DB1 there are 5 records for the different items available, in DB2 there is a record with repeating field containing only the selected items from DB1 (copied data, no active links/relations). This example only has 5 values max, but my real situation has 50+ possibilities and I don't want to copy the redundant info into my DB every time, just what is selected. Jim
QuinTech Posted October 27, 2004 Posted October 27, 2004 It sounds to me as if you're better off forgetting repeating fields and going with a true relational structure. Repeating fields are of limited value, and it looks to me as if your scenario is a bad candidate for it. If you've already considered this, why did you choose a repeating field? There might be a good reason for it that i'm not picking up on. J
Triodes Posted October 27, 2004 Author Posted October 27, 2004 Hi, There is a smalll amount of info that needs to be added to a quotation, and 50% of the time it is not even used at all. I already have 40 files in my system and don't want to add another for just a few lines here and there. I have a DB file that contains price/description info for types of labour we offer for our products. The user can select the actions he wants to have done from this list and then import the text descriptions and total price into their quotation (as a single, seperate, record c.q. quotation line). Adding another layer of multiple records, extra relation and dB file below this layer seems like overkill to me. Right now I am importing every line of the table, selected or not, and copying it into a repeating field of my Quotation Lines dB. So the entire table is copied (only if one or more items in the table are selected). This means a lot of text that is redundant/unnecessary. This info is only for double checking later on should there be a disagreement, so the less I have to store the better. Jim
transpower Posted October 27, 2004 Posted October 27, 2004 Use the Status( CurrentRepetitionNumber ) function.
Triodes Posted November 3, 2004 Author Posted November 3, 2004 Hello transpower, This will make for a huge script, checking for each possible instance if the current repetition is used. I don't know how many repetitions there will be or how many records are to be copied there. I will try it though, maybe I am not seeing something clearly and just need to play with rep. fields some more. Jim
Ender Posted November 3, 2004 Posted November 3, 2004 Follow QuinTech's advice and ditch the repeating fields.
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