Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

What would be the best structure to offer the user a choice to use a template, or not?

They start a new Estimate and are asked "Would you like to use a template?" Yes, and ?????

The template contains all fields with data, where user enters quantities.

Estimate Table

Do I use;

Template Table w/repeating fields?

Template Table w/globals?

No need for relationship?

User needs to grab data from Template, and also be able to edit numbers on template as costs change.

Tks

Posted

First, your main estimating database will need at least two tables: one for the estimate itself, and one for the estimate line items. Then you will need an additional table or tables for the template.

What I have done on a few projects is make a template table where there is one record for each template, and then, in that record, use repeating fields for the line items. Then, when creating an estimate with a template, create a new record in the estimate table, and then import the single template record into the line items table using the option to split repeating fields into separate records. This allows your estimate to use a proper related structure with multiple line item records, with the simplicity of a single record in the template table.

Posted

You might also consider adding a Boolean attribute to your parent records which bestows template status on a record, allowing you to filter it out in finds and so forth. You can also use conditional record level access in your privilege sets to determine who is alowed to create and modify templates. This technique eliminates the need for a parallel template infrastructure.

PS If you have an Advisor subscription, you can check out this article that I wrote on duplicating hierarchies. http://filemakeradvisor.com/doc/16095

Posted

Currently I have;

Estimates Table

Estimate Line Item Table

Est Template Table

User can select a button to "Use Template"

These are the scripts;

If [ PatternCount (Get ( LayoutName );"JCEstimates New") ]

Commit Records/Requests Perform Script [ "Slide Down" ]

Perform Script [ "Slide Up" ] Perform Script [ "Zoom" ]

Go to Layout [ "JCEstimates PSD" (JCEstimateLineItems) ]

#This will import from Detail Codes a template. Show Custom Dialog [ Title: "Import Template"; Message: "Do you want to use an Estimate template?"; Buttons: "Yes", "Cancel" ]

If [ Get ( LastMessageChoice )=1 ]

Perform Script [ "Layout - JC Estimates Use Template" ]

Go to Portal Row [ Select; First ]

Go to Field [ JCEstimateLineItems::Detail Number ] [ Select/perform ]

End If

Else

Go to Portal Row [ Select; First ]

Go to Field [ JCEstimateLineItems::Detail Number ] [ Select/perform ]

End If

Import Records [ Source: "file: Constr.fp7"; Target: "JCEstimateLineItems"; ]

In this part I don't know if I'm following protocol with respect to ID's;

Insert Est ID Go to Field [ JCEstimates::KPEstID ] [ Select/perform ]

Copy [ JCEstimates::KPEstID ] [ Select ]

Go to Layout [ "JCEstLi - Import L/o" (JCEstimateLineItems) ]

Paste [ JCEstimateLineItems::kfEstID ] [ Select; No style ]

Replace Field Contents [ JCEstimateLineItems::kfEstID; Current contents ] [ No dialog ]

Go to Layout [ "JCEstimates PSD" (JCEstimateLineItems) ]

Go to Field [ JCEstimateLineItems::Phase No ] [ Select/perform ]

Replace Field Contents [ JCEstimateLineItems::Phase No; Replace with calculation: 400 ] [ No dialog ]

This is the only way I can think of to get the EstID into the Est Line Items file, and I need it there to

identify which estimate the line items belong to, or do I? I do have a layout for I use for printing (the portal) where I can call up the estimate by estid.

Is this structure funky?

Posted

I like your thoughts but I don't know about using repeating fields.

Do you find it slow?

Please see my reply to dual mon.

Posted

Generally, I avoid the use of copy/paste and use the Set Field script step instead.

One other way to get the EstID into the line items is to set a global field to the EstID, and then have the ID field in the line items set to autoenter from that global. So, as the records are imported the ID is automatically set.

I don't see any problems with the repeating fields in the template table in this case, because they become separate non-repeating field records once imported into the line items table. BTW, this is just about the only situation where I would use repeating fields.

This topic is 7147 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.