can ADD_LINE_ITEM table be duplicated??

filemaker

    Sponsored Links

    Next

  • 1. Ignore empty repeating fields in email script
    I have a calc field for my recipients and I want it to ignore empty fields. There are 5 repetitions. and it looks like this: database::resource[1] & "@xxxx.com" & database::resource[2] & "@xxxx.com" & database::resource[3] & "@xxxx.com" & database::resource[4] & "@xxxx.com" & database::resource[5] & "@xxxx.com" & How do I get this script to ignore the lines if it is empty? As it stands I get "@xxxx.com" in my recipient line for each empty repetition.
  • 2. Creating New Related Records via Terminal.
    There are a few things that I am trying to accomplish here: 1) Use terminal to create a new record in my database. 2) Have that record draw upon a relationship between two tables. Lets say I have two tables: Shots and Notes. "Shot" is the related field between the two tables Here is what I would like to enter in a command line in terminal: "note VFX001 Lighting Try and get more wrap around the frame left side" which would be triggering information to be entered into the following fields in Filemaker: "<alias for applescript> <Shots::Shot> <Note::Dept> <Note::Note>" I need the first three spaces above to tell Filemaker to move to the next field, but then after that I need all the sentences/spaces to be added to the final "Note::note" field. Some info about the set-up: 1) FMP 11 2) OSX 10.6.4 3) Database is remotely hosted This seems like a tall task, but someone must have wanted to enter records via terminal before? Any information I have left out?
  • 3. alternate ODBC driver for Mac OS 10.6 Server
    Is there an alternative ODBC driver for Mac OS 10.6 other than the one recommended by filemaker from Actual Technologies? Looking for a free solution that will work on OS X 10.6 Server. darren burgess

can ADD_LINE_ITEM table be duplicated??

Postby vaggelis » Fri, 23 Oct 2009 03:40:48 GMT

hello,
i have a problem that someone might be able to help me.
In my invoice layout, i have an add line item for my products. The
thing is that i want to make another addline item for my services and
this is where i have the problem.
 i actually copied the way the first addline item works, by creating a
new table, make the proper relationships, duplicating the script( Sets
variable with INVOICE ID, Create new record, set INVOICE ID, and
return to original layout) for the addlineitem button but still when i
press the button it says "this operation cannot be completed because
the target is not part of a related table".
, is it a problem that i use the invoice id again?? any
suggestions???  :(


Re: can ADD_LINE_ITEM table be duplicated??

Postby 105 » Fri, 23 Oct 2009 08:50:14 GMT




it sounds like you created two line items tables? one for 
productlineitems and one for service lineitems? And then hoped to see 
them in the same portal? Probably not, but not clear from your description.



one line items table, and if there are 2 source tables (products, 
services) that you want to reference, teh line item table:
lineitem_id
invoice_id
item_id ( ie product_id OR service_id)
type (prod, serv)

then you couuld have  invoice::lineitems::products and 
invoice::lineitems::services as  branched hopped rels for displaying the 
  product/service details in teh lineitems portal.


If you are using a bts_lineitems layout:
parse product_id or service_id to variable ($_item)
set $_type = prod or serv as appropriate
parse invoice_id to $_inv
bo bts_invoicelines
new record
set invoicelines::invoice_id = $_inv
set invoicelines::item_id = $_item
set invoicelines::type = $_type
return to original layout


the add line item can be the same single script for both prod and serv, 
it is only the   input to the initial variables that is different, and 
this is dependant on how you are selecting the product or service.

If it is a pop window with filtered portal ...




Re: can ADD_LINE_ITEM table be duplicated??

Postby vaggelis » Sat, 24 Oct 2009 02:37:27 GMT




>>>> hello,
>>>> i have a problem that someone might be able to help me.
>>>> In my invoice layout, i have an add line item for my products. The
>>>> thing is that i want to make another addline item for my services and
>>>> this is where i have the problem.
>>>>  actually copied the way the first addline item works, by creating a
>>>> new table, make the proper relationships, duplicating the script( Sets
>>>> variable with INVOICE ID, Create new record, set INVOICE ID, and
>>>> return to original layout) for the addlineitem button but still when i
>>>> press the button it says "this operation cannot be completed because
>>>> the target is not part of a related table".
>>>> , is it a problem that i use the invoice id again?? any
>>>> suggestions??? (>
>>
> it sounds like you created two line items tables? one for>
> productlineitems and one for service lineitems? And then hoped to see>
> them in the same portal? Probably not, but not clear from your description.>
>>
> one line items table, and if there are 2 source tables (products,>
> services) that you want to reference, teh line item table:>
> lineitem_id>
> invoice_id>
> item_id ( ie product_id OR service_id)>
> type (prod, serv)>
>>
> then you couuld have nvoice::lineitems::products and>
> invoice::lineitems::services as ranched hopped rels for displaying the>
> product/service details in teh lineitems portal>
> If you are using a bts_lineitems layout>
> parse product_id or service_id to variable ($_item>
> set $_type = prod or serv as appropriat>
> parse invoice_id to $_in>
> bo bts_invoiceline>
> new recor>
> set invoicelines::invoice_id = $_in>
> set invoicelines::item_id = $_ite>
> set invoicelines::type = $_typ>
> return to original layou>
> the add line item can be the same single script for both prod and serv>
> it is only the input to the initial variables that is different, a>d
> this is dependant on how you are selecting the product or servic>.
>>
> If it is a pop window with filtered portal ...


hello again and i really thank you for your quick answer!
I indeed created 2 addline item table , each for every portal but from
what i read , it's not gonna work!
So, you tell me to create 2 tables ( for products , and services) have
only one addline item table and modify the script ?
right?




Re: can ADD_LINE_ITEM table be duplicated??

Postby 105 » Sat, 24 Oct 2009 08:00:52 GMT

aggelis wrote:

>> So, you tell me to create 2 tables ( for products , and services) have >> only one addline item table and modify the script ? >> right? >> >> >>

yes to one lineitem tabl
maybe to individual product and services table
yes to modify the script

well you could have 2 lineitem tables (your 'created 2 addline item
table') , but that would mean you needed a portal for each, and what
would be the point? It would also be a design transgression, and
require calculating the invoice total as the sum of the line items in
each lineitem table...). An invoice has associated (related) lineitems.
The line items can be of different types. Simple.

So Invoice table:
invoice_id
company_id
date, subtotal, tax, total, (description)...

InvoiceLines table
invoiceLine_id
invoice_id
item_id
=/- sourceTBL/type
qty, cost, aec_cost_ext...

and a portal on the invoice form, invoice to invoiceLines using
invoice::invoice_id to invoiceLines::invoice_id
(this is a non-acrr rel)


a bts_invoiceLines table; used for the script creation of new invoice lines

script to create a new invoice line


As for the products/services. These can be one table (e.g. items) with a
type field (prod or serv), or 2 tables. There are advantages to each
approach, but one table is arguably better design, but 2 may be more
pragmatic in your situation.


How are you selecting the item (service or product) to add?

Re: can ADD_LINE_ITEM table be duplicated??

Postby vaggelis » Wed, 28 Oct 2009 22:32:43 GMT

n 22 , 21:00, 105 < XXXX@XXXXX.COM > wrote:





i want to ask you some clarifications cause even if i try i need the
opinion of an expert as you are!
you said that the invoiceLine table should be like
InvoiceLines table


regarding that i have one invoice table, one invoiceLine table and one
table with both the products and services
how should i relate the item_id with what? what is =/- ?

and what do you mean i should make a a bts_invoiceLines table ? (;
used for the script creation of new invoice lines )
this is more strange for me..:S

If am trying to fix it and still can't, just waisting time and time..i
am kinda disappointed for not being able to slove such an easy thing..

Can you plz help me?
thanks in advance

Re: can ADD_LINE_ITEM table be duplicated??

Postby 105 » Thu, 29 Oct 2009 07:50:19 GMT

aggelis wrote:



I am assuming you are using FM10


=/- was a typo, it was meant to be +/-
It was unclear whether you were using 2 source tables (products and
services)
- if you were using 2 source tables, a (source) type field in the
invoicelineitems table would be worthwhile
- now that it is clear you are using one source (items) table, which
contains both products and services, a 'type' field (values: prod, serv)
is probably optional, although I would suggest including it. A type
field in the lineitems table could be used for a filter to separately
subtotal services and products on the invoice, for example.




bts_ is just shorthand for 'behind the scenes'
bts_layoutname layouts are used in scripts etc, and are normally hidden
from the user.
there are different ways of creating new related records.
You can use an acrr rel, establish the appropriate key fields, and
create a related record via the acrr rel (either in a portal or single
field) . Which is probably what you are familiar with.

You can also grab the relevant id values, and appropriate data, into
variables ( eg $_inv $_item.... or $_invoice_id, $_item_id...; syntax
variations )
then have the script
- go to the bts_lineitems layout
- create a new record
- the invoicelineitem_id primary key will automatically enter (you have
the key appropriately defined?)
- hard code the lineitems::invoice_id ( = $_invoice_id)
- hard code the lineitems::item_id (= $_item_id)
hard code the type (if used) as prod or serv (from another variable...
- etc (etc can be using lookups to enter cost.. or parse these into
variables as well
- then return to the invoice layout, commit/refresh


The advantage of using a go bts_layout is one less dedicated
relationship. Both approaches achieve the same result. I used to use
acrr, now I routinely use the go bts_layout approach.


If you use the parse into variables approach, use $ (local) and not $$
(global) variables; $ variables automatically clear there values once
the script has completed. Be clear and consistent with naming variables;
think about another developer looking at your script, or even yourself 2
years down the track; how obvious are the names?
example $_inv, $_inv_id , $_invoiceID, $_invoice_id
pick a pattern and generally type to stick to it; sometimes one has to
be prgmatic rather than dogmatic, but generally try to be consistent in
naming patterns (same applies to fields, table names...)



It always takes a while for the basic processes to become familiar
vaggelis; we have all been through it :-) It is easy to get swamped
with the details, think about the process e.g.
- parse relavant values to variables
- go line items layout
- new lineitems record
- hard code details from variables to line items record
- return to parent invoice record

It will come together, keep at it.


regards


Chris

Similar Threads:

1.In which table am I (FMP 7)

2.Compare tables for duplicates

I have two tables, both have a field with the same data type and length 
(11 digit numbers).

I want to compare the two tables.

Table A is my master table.  Table B is the one I want to compare A against.

I created a field in Table A called Duplicate.  Basically, I want a 
comparison of B against A, and when there is a match (duplicate), It 
will populate the Duplicate field with something (1, Yes, etc).

Thanks in advance.  

3.Duplicating and / or copying tables (FM7)

Is there a way to duplicate and then rename tables in a file or copy
them from one file to another ?

I have a number of standard fields I put in every table (id, creation
date, creation time, modification date etc. etc.)

In previous FM versions, I'd have a "template" file with these
standard fields and I would simply make a copy, rename and then add
other relevant fields.

It now seems I have to enter my common fields into every new table or
am I missing something ?? Any advice would be appreciated. Thanks

4.duplicate table?

hi all--

i am looking for a way to duplicate a table.

i do not mean to create another instance, as one may have to do in
defining some relationships, but to create an actual duplicate 'copy'
of an existing table.

i am inquiring because i have a table with a few hundred fields (the
rationale for this is that the table should not be more normalized as
they are all protein attributes, and other functional reasons)

i wish to create a copy of this table.


my end goal is to accomplish something like this:
1) have an existing table that serves as the data repository
2) import excel spreadsheets into the second 'copy' table
3) compare each field value for each record in the data repository to
the 'copy table'
4) identify any non-matching data
5) allow the user to modify the copy table's non-matching data/and or
choose to overwrite the data repository data

that is the functionality that i am looking for. i can do all of that,
with the exception of replicating the data repository table (with all
the value lists associated etc).

I am also open to other solutions that would allow a user to import
data into the data repository but generate a custom dialog whenever a
field value for a given record on the import file might not match the
field value of a given record in the data repository if the id of the
data repository record and the import file match (i.e. that the record
being imported is not a 'new' record)

i hope this question is not too muddled and would be happy to provide
any clarification and appreciate all thoughts.

best,
sg

5.Delete Duplicate Records from Fragmented tables.

 
Hi all,

I know its repeated question....Can you please send me the script "to
delete duplicate data from Fragmented table". Rowid cannot be used on
fragmented table.

Thanks
Prashant


6. finding duplicate fields in a table

7. SELECT duplicates in a table

8. Getting rid of duplicate tables.



Return to filemaker

 

Who is online

Users browsing this forum: No registered users and 91 guest