Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

After several trys I think that I've gotten completely stuck with the idea what I'd like to have:

I've two tables:

menu and user. their content may but must not be connected by entries in table menu_user.

For easy maintenance I'd like to have a layout menu_form that shows a menu, and all user(s) connected to it and all user(s) that are not.

In both portals showing the related/not related user(s) I want to have a button allowing me to delete a certain menu_user-connection or to establish such a conection.

My example has worked a bit - but not correct for all cases. So after two days of experimenting I've cleaned all scripts updating table menu_user and decided to ask somebody understanding FM better than I do. After doing a lot of work with sql databases in the past I'm somehow biased for sure, and it seems to me that I really don't understand the logic used by FM.

Main problems (layout menu_form):

-I'd like to see in one portal (1) all users connected to the currently displayed Menu

If there are none, this portal must be empty

If there are some, portal 2 must show all the others

If there are all, portal 2 must be empty

-I'd like to see in another portal (2) all users not connected to the currently displayed menu.

If there are none, this portal must be empty.

If there are some, this portal must show all users that are not shown in portal 1

If portal 1 is empty, all users must be shown in portal 2

-I'd like to have a button in each record shwon in both protals allowing me to delete or to create a connector record in table menu_user.

Both portals should show this change afterwards.

I was able to create this, but only and always with the first record in a portal - but I was unable to get the correct id of the clicked user record in the portal I needed to add or remove a row in table menu_user with my script.

Any help is higly appreciated.

menu.zip

Posted

very useful, thanx a lot.

Helps me to understand something more about FMs way to solve application problems.

unfortunately I was unable to find the solution you mention even with a relatively high amount of searching in the faq with keyword portal, portal to portal and a lot more ... most searches deliver a huge amount of info to scan.

Any ideas about a better way to search to get less and more relevant infos out of the faq?

by the way:

do you know a very good book explaining the "philosophy" used by FM (will be helpful to get a clue about how to solve real problems) and all FM parts and how to use them?

Most books / texts I've found so far explain only very basic things. No chance to create a thing like your portal_to_portal with this information.

A person asking something is a fool for five minutes, but a person not asking remains a fool for the rest of its life.

Posted

I'm afraid I am not the right person to answer any of these questions. All I can say is that for the more advanced techniques you'd better stick with these very forums.

Posted

hmmmm ...

I've studied your solution with great interest. It makes exactly what I like to have, and I love it.

Then I tried to rebuild your solution from scratch to get a better understanding about HOW TO MAKE IT, and HOW DOES IT WORK.

I wa not able to create an exact clone of your solution, and my solution does not work properly, and I'm unable to find the reason for.

So far I got stuck with some stupid problems that could be the reason for malfunctions:

-How do you create table "UninstalledSoftware"

Your table only contains "SoftwareID", nothing else.

Is this table a shadow table of Software or something else?

When I create this table by dragging "relation" in and out with table Software, my so generated shadow table always contains all fields of the "parent" table, and I found no way to remove the fields not needed.

-How must I create the field containing values from cInstalledSoftwareIDs?

I've seen that this is an edit box, but in my example it does not show any values.

-I'm unable to create Script Command

"Set Field[installations::SoftwareID;$softwareID¨]

My result from script editor set field looks this way

"Set Field[installations::SoftwareID[$softwareID¨]]"

I doubt wheter this makes the same as yours, and am simply too stupid to find a way to create the right one.

Overall question:

Is there kind of a "cookbook" instruction (step by step) available telling me what I must do to and how to create a working portal-to-portal solution, and how it works at execution time (step by step)?

As I worked so far with DBs with a strict separation between data (IBMs DB2) and processing

DB data (several languages e.g. COBOL, PL/I, Assembler, PHP and JAVA) and using the Model-View-Controller approach FMs basic ideas for building an application are hard to understand for me - sorry for this.

Please be aware of the fact that I do not say one's better that the other, but their "philosophies" are very different.

so any help for a better understanding is highly appreciated ... thanx in advance

Posted

Obviously, I cannot debug your file from here, even if I wanted to. Reading these problems, I get the impression that you're simply not yet familiar enough with some basic Filemaker techniques.

For example, a "shadow table" (a table occurrence, in Filemaker terms) always contains all the fields of the base table. On the relationships graph, a TO can be resized/collapsed so that not all of its fields are visible - but that is a purely cosmetic feature.

Or your:

"Set Field[installations::Soft wareID[$softwareID¨]]"

shows you're putting the variable into the box designated for the target field's repetition - instead of into the "Calculated result" option.

These things are covered in the Help.

Posted

Obviously, I cannot debug your file from here, even if I wanted to.

Obviously, yes :)-))

Reading these problems, I get the impression that you're simply not yet familiar enough with some basic Filemaker techniques.

Yes. This was the main reason to ask for better basic information. I'm interested in a description / how-to guide describing of all script commands and all functions. It should contain a description of the result delivered, the parts and their parameters needed to get it and information how to create it. FM help does not cover this in detail.

For example, a "shadow table" (a table occurrence, in Filemaker terms) always contains all the fields of the base table. On the relationships graph, a TO can be resized/collapsed so that not all of its fields are visible - but that is a purely cosmetic feature.

I'm familiar with this. But I was unable to "explode" table "UninstalledSoftwareIDs" in your portal-2-portal example. As far as I can see it contains only one field "SoftwareID". This lead to my question for this.

But as my TO seems to work even with all fields from the parent table in it, this is not a big one.

Or your:

"Set Field[installations::Soft wareID[$softwareID¨]]"

shows you're putting the variable into the box designated for the target field's repetition - instead of into the "Calculated result" option.

You're right. This helps a lot.

My rebuilt app runs now, and I'm working to complete it.

These things are covered in the Help.

Unfortunately they are not as far as mentioned above and as needed by a novice ;-(.

It would be very nice to have written information structured like this:

-the result (what do i get)

-the way to get it

-the parts - e.g. layout(s), script(s), function(s) to be used to get it

-the parameter(s) of the parts

-how to create the parts

This means that I'd like to have a Programmers Guide and a Programmers Reference as well :-)).

I think this could be useful for everybody ...

Agree?

I'll put my solution here, as soon as it works as expected.

Posted

If you would like an alternative source to the forum, that will show you step by step instructions on how to build an application I would suggest you subscribe to ISO FileMaker Magazine- http://www.filemakermagazine.com/subscribe

For $25.00 per quarter you can view and download hundreds of sample files and learn very sophisticated techniques. Then you can ask your really simple or complex questions here on the Forum.

Additionally, if you haven't already read the following:

http://www.filemaker.com/help/MacTOC8.html

http://www.foundationdbs.com/ Read the White Papers for FM novices.

I would suggest you do.

hth

Posted

I'm interested in a description / how-to guide describing of all script commands and all functions. It should contain a description of the result delivered, the parts and their parameters needed to get it and information how to create it. FM help does not cover this in detail.

I certainly agree we could use better help, but the thing you describe DOES exist:

http://www.filemaker.com/help/functionsTOC.html

http://www.filemaker.com/help/script-stepsTOC.html

Posted

I've already read the whitepaper.

But many thanks to both of you; it certainly helps a lot. I'll do as advised.

have a great time

and here comes what I've done so far:

layout menu_form works as expected, but user_form does not. Its right portal shows always all menus available. This allows to make more than one connection between menu and user. I've mirrored the solution used for layout user_form. But there's probably something stupid again too I've overlooked in this?

db.zip

  • 2 weeks later...
Posted

hmmm ...

it was another stupid one - as always after finding it :)-))

I forgot to create the Variable List "connected_menu_id", Source "From Field", Values Field:"menu_user::user_id" (related values only). This must be done in fm menu "define ... / value lists".

It is used to calculate the content for the field "c_connected_menu_id" in table "user".

Now it works as expected.

I've added the working example here.

As soon as time allows I'll put a little cookbook online to describe what's the target/result one gets, how it works, and how it can be made.

db.zip

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