-1

I have a set of tabs inside the window items layout in the database file.

when I click the plus popover button, I want it to generate a new record in the products layout and fill out all the fields based on the active tabs and the extra description field based on the last edit box field at the bottom of the tabs. can someone help me do this as I have tried a few different scripts and have had no success. once the record has been created in the products layout/table, I also want it to generate a record in the window item table based on the linked itemid field and the autoenter calculation that is setup on the description field.

this is probably all very confusing but I would be glad of any help you can offer.

Window Item Database Copy

Jeremy
  • 41
  • 3
  • This is off topic for StackOverflow. I suggest you join one of the Filemaker community forums and post your question there. – michael.hor257k Jan 06 '16 at 07:06
  • thanks. I was trying to post it in the filemaker community but for some reason it wouldn't let me - I can now so will have another go. cheers – Jeremy Jan 06 '16 at 21:49

1 Answers1

0

Your question is more a problem than a question. I'm assuming your questions:

1) should I use a script trigger for that? Probably not. You should use a button to call the script, it should create all the records you need, come back to the layout and open the popover.

2) how to check the active tabs? You should you the getLayoutObjectAttribute ( , "isFrontPanel" ). That will allow you to correctly set the ifs.

3) how to create a record in any table? to be honest, you should start by going to the layout you want and then creating the record. That's an easier way.

What you are trying to accomplish is not that hard. You just need to break it in smaller steps.

calebmiranda
  • 156
  • 13
  • I mean, getLayoutObjectAttribute ( InsertLayoutObjectName, "isFrontPanel" ) – calebmiranda Jan 06 '16 at 09:32
  • I need to be able to get the layout object attribute from about five different tabs though - will the isFrontPanel still work for multiple tabs stacked up as I have in the database. also - I was planning to use a button to trigger the script in the last stacked tab beneath the field for comments. the reason I want it to create the record in another table is because I want to be able to add the item from the jobs list and it will need to automatically create in a related job list items table. probably very confusing but thanks for your help anyway! – Jeremy Jan 06 '16 at 21:48
  • are you familiar with naming objects in FMP? getLayoutObjectAttribute will work for it, no problem. The button should be easy too. – calebmiranda Jan 06 '16 at 22:04