Jump to content
Server Maintenance This Week. ×

Setting Field to Portal Row.


Nestor

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

Recommended Posts

Hi, this is probably simple, but i can't seem to get it right.

I have a script and at the end of the script it calls for "go to portal row (select; last)

set field [iten number_products::ItemNumber;$sn]

but for some reason it always goes to row #2 under my portal, and if i change it to first, then it always replaces my first.

how can i make it so that the info goes to portal row 1 and then 2 and then 3.

My portal has 10 rows.

Thanks

Portal.jpg

Link to comment
Share on other sites

Use the Go To Portal Row[First] instead so that you start at your first related record. If you are using the Go To Portal Row [Last] option, it is going to the last related record shown in the portal.

Just because you have 10 portal rows, does not mean that you can use Go To Portal Row [] to go to each row. There has to be a related record that already exists in the portal row before you can go to it. The only exception to this behavior only occurs if you setup the relationship use by the portal to "Allow Creation of Related Records". If this in on, you can use Go To Portal Row [Last] to visit a portal row where a record does not yet exist.

So if you have this option turned on for example and you have 3 related records showing in a portal that is set to have 10 rows, using Go To Portal Row[Last] will put your on Portal Row #4. If this option is off, then Go To Portal Row[Last] will drop you onto portal row #3. Make sense?

One more thing:

If you have multiple portals on the same layout, how does it know which portal you are referring to? Filemaker will automatically go to the first portal that was created on your layout. If you have more than one portal, this causes an problem.

The answer to this is to use Go To Field[] and specify a field that is located in the portal that you want to select first. Then you can use Go To Portal Row[] to navigate in the correct portal.

Furthermore, if you want to incrementally go to each portal row and perform an action in each one, you will need to use a Loop/End Loop structure in your script and probably use Go To Portal Row[by Calculation...]. Use a variable to keep track of what portal row you are on at the time and when the portal row does not change, you should exit the loop.

Edited by Guest
Link to comment
Share on other sites

Databases are not spreadsheets!

The rule is simple: don’t turn on Allow Creation of Related Records and don’t allow us-

ers to enter and edit fields directly in a portal unless no other reasonable options are

available. This no doubt comes as a shock, especially in light of the fact that FileMaker

seems to lend itself so well to doing just the opposite. In fact, FMI tells you directly to

allow creation and editing of records in portals, but don’t.

Quoted from: http://www.foundationdbs.com/Downloads/WhitePaperForFMPNovices.pdf

Which is a good read not just only when embarking on the vessel filemaker as such but when brushing up skills as well. There is an important point in knowing that:

how the structure of data doesn't have to match the presentation

...even ardent abstraction haters, should know that abstractions have been made on the topic with genuine mathematical proofs consolidating these. This is bad news to a discourse of no BS and urge to get the work done as simple as possible where portals only in reality are for reporting task, and the urge to manipulate it's contents via the interface are in vain.

A good read on what a cliffs edge "practitioners" actually are standing at is this:

http://fmforums.com/forum/showtopic.php?tid/186768/tp/1/

--sd

Link to comment
Share on other sites

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