Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Dynamically generated layout?


JimLange

Recommended Posts

Is this possible?

 

I need to write a script that will (1) take input from a set of Boolean data fields on one layout, (2) switch sequentially to a series of pre-formatted, single-field secondary layouts associated with each Boolean field, (3) copy the formatted field, (4) duplicate an existing "headered and footered" but otherwise empty third layout, (5) paste the pre-formatted field into this duplicated layout, (6) correctly reposition the cursor, and (7) continue with this process until all the individual fields are pasted where they should be, then (8) save the whole bloody mess.

 

To clarify, here’s a possible scenario: A supermarket has 25 departments (meat, produce, dairy, paper goods, bakery, pharmacy, frozen foods, et cetera, et cetera). Each department is listed on Layout #1 and is associated with a Boolean number field.

 

Let's say that the user is tasked with spot-inspecting a maximum of five departments each day. He/she enters an "X" into Boolean fields corresponding to only five departments, then activates the script.

 

This is the desired result:

 

The script checks to see if a layout containing ONLY THOSE FIVE FIELDS exists. If it does exist, it switches to the layout and creates a new record. If it does not exist, it creates the layout as mentioned above and then creates a new record, already formatted and ready for comments to be entered.

 

The scripting part I can probably handle; but the creation of a layout that is aligned and formatted for printing might be too much for my little brain.

 

Any thoughts on how to approach this?

 

Thanks,

Jim

Link to comment
Share on other sites

Hello Jim,

FileMaker's built-in ScriptMaker facility does not provide capabilities for work in layout mode. So if you want to pursue this idea, you're going to have to look to a third-party scripting language to do significant chunks of what you have in mind.

 

One option you might like to explore would be the cross-platform utility called QuicKeys, which is certainly capable of doing parts of what you want - and ScriptMaker can do other parts. Tying it all together, will still present soemthing of a challenge, I think. wink.gif

Link to comment
Share on other sites

Jim,

Perhaps it's a good idea to describe in more detail what exactly the user's task is. creating layouts seems secondary - there may be another solution to this.

For instance:

Assuming the fields you wish to copy in a layout are checklist items,

What if you created standard layouts with standard content fields in a portal, with dynamic field labels (this simply means, create another field that designates a field label). I expect it's much easier to script the naming of these field labels and script the creation of checklist items as individual records that are related to a spot inspection.

 

 

 

kjoe

Link to comment
Share on other sites

Thank you, Ray and kjoe. I may be expecting FMP to do more than it is able.

 

For this application, the user's task is to inspect and rate the general shelf appearance, condition of product packaging, existence of bin pricing labels, etc. of no more than five departments out of 25. I want to be able to pick the five departments and create a screen containing only those five.

 

Maybe a simpler approach is to set up the checkboxs so that a "find" script displays the checked departments in a list view. I'd have to assign a session ID to the entries so that they could be revisited later as a group.

 

And this may be a slight bit off-topic, but do either of you have a favorite FMP 7 reference book? There's so much to know, and so little time. blush.gif)

 

Thanks,

 

Jim

Link to comment
Share on other sites

kjoe--

 

The number of inspection items will vary from five to seven depending on the department. For instance, "temperature" will apply to perishables in several departments but not to cereals and other grains.

 

And thanks for the recommendation of the FMP bible. I was browsing through one for ver. 7 at lunchtime today to see if there was information on setting up two "either/or" radio buttons. It seems to be a very complete resource.

 

Jim

Link to comment
Share on other sites

Hi Jim,

 

I provided a sample with a possible solution. I have used a portal to create inspection items that represent a department; all portals rows have the same inspection fields. But departments where temperature is not applicable, the phrase "not applicable" appears automatically; and the user can't change this.

Every portal can be filled manually with five departments (five portal rows).

The portal rows can be adjusted horizontally and vertically to accommodate more and or larger fields.

 

kjoe

Link to comment
Share on other sites

[ QUOTE ]

...And this may be a slight bit off-topic, but do either of you have a favorite FMP 7 reference book? There's so much to know, and so little time. blush.gif)

 

[/ QUOTE ]

I'd have to say that the best I've seen to date is Special Edition Using FileMaker 7 by Lane, Bowers, Love and Moyer. There's a lot in there. wink.gif

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use