Jump to content

Setting repetition number from calculation result


This topic is 7076 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 confused.gif

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 7076 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.