Jump to content
Sign in to follow this  
Triodes

Setting repetition number from calculation result

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Use the Status( CurrentRepetitionNumber ) function.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    SRBENET 
×
×
  • Create New...

Important Information

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