How familiar are you with how portals are designed and intended to function? Have you used them before?
Portals are based on a relationship between the layout's table and the portal's table via a pair of table occurrence boxes linked in a relationship set up in Manage | Database | Relationships.
I would like to show all the records in the portal based on the current record that the portal is on.
describes the expected result for an unfiltered portal. The records listed in the portal will be all those linked to the layout's current record via match fields defined in a relationship.
and instead on setting a date trigger to show only certain records I would like to ommit the portal row record with a button on that portal row
What do you mean by a "date trigger"?
In any case, if you set up a portal filter expression, you could use such a button to omit a portal record from view in the portal by modifying the value of a field referenced in the portal filter expression.
You might use an expression like this as the portal filter:
IsEmpty ( FilterValues ( LayoutTable::ExcludeList ) ; PortalTable::__pkPortalTableID ) )
Clicking your "omit" button in the portal row could perform this script:
Set Field [LayoutTable::ExcludeList ; List ( LayouTable::ExcludeList ; PortalTable::__pkPortalTableID ) ]
If the portal does not immediately update after clicking the button, add this step after the Commit records step:
Refresh Window [Flush Cached join Results]
OK, I guess I was confusing in my explanation
I have Layout1 (based on Table1) with a portal looking at Table2 (there is also a layout on this table, Layout2)
I would like to "hide" records from Table2 being viewed in the Portal by clicking a button that is in line of the portal row.
I was trying this on a button in the portal row:
Go to related record (takes to Layout2 based on related record from portal row in Layout1)
Ommit Current Record
Go to Layout1
This did ommit the record in Layout2, but it still shows up in the portal in Layout1. Is there a way to filter the portal to only show un-omitted records?
I also would like a button to bring back all the records that were "hidden" in the portal (but only based on that record), so a show all records from Layout2 based on related records from Layout11.
Im sorry if this is still not making sense.
Nothing in your latest post changes my advice in my first post. You can use a script with a portal filter set on your portal to selectively omit records from the portal.
and this script:
Set Field [ LayoutTable::ExcludeList ; "" ]
Will return all the omitted records back to the portal.
Ok thanks, So I need to add an "ExcludeList" Field to Table1?
A global field or global variable might also be used, but if you do the exclude list is global--you get one list for all records in Table 1, specific to different users on a hosted system and the list will not be retained when you close the file. It also may require a Refresh Window [Flush... script step to update the portal where I think you can just use Commit Records if you use a field local to the current record. (Refresh [Flush... can result in major delays waiting for the layout to update in some situations so it is best used only if you can't otherwise get this to work.)
This is great so far!!
The Omit button works perfectly without the "ExcludeList" field set as global.
The button to bring back all records only brings back the first record in that portal row. Can this run through all records?
It should bring back all records.
Make sure that it is correctly clearing the ExcludeList field, then
Try adding Refresh Window and see if things update correctly. If not, try Refresh Window [Flush Cached Join Results].
If you find that the last option works but is producing delays that are not acceptable (keep in mind that this becomes an increasingly major issue as the number of related records increase, when hosting from a remote site or when using FM GO on an iOS device), let me know and I'll describe a way to use ExcludeList as a match field in order to eliminate the need for the Refresh Window [Flush.... step.
Its still the first record only coming back.
Set Field [LyoutTable :: ExcludeList;""]
Commit Records/Requests 
Refresh Window [Flush cached join results]
Am I missing something?
Does the ExcludeList field need to be text? container?I have it as a container
Then I am surprised that this worked at all.
It should be text. Container fields are only used to store files or references to files.
When I set it as a text field I don't see any values in ExcludeList, but when its a container field the values appear as they should. Its just the first goes away when when the "omit" button runs.
Its almost like a loop to next record needs to happen, or use ExcludeList as a global field to go "" (blank) based on similiar fields.
I'm not sure, but thanks for all the help so far. I'll keep working on it, its almost there.
Sorry, but that makes no sense at all. As a text field, you should see every change that is made when you run one of these two scripts.
The omit button should only omit one record, but it should be the record that you clicked. Are you saying that you can click the button in any row of the portal, but it always omits the first portal row record?
Running the script to bring back all the omitted records should then clear the text field.
Sorry to state the obvious, but "container", "text" and "number" are field data types that should be specified in Manage | Database | Fields.
The omit button is working great!
The bring back all records into the portal button is only bring the first record back
Maybe the attatched will help.
Using the ExcludeList field as text or container acts the same, but when as "text" the values arn't visible in the excludelist field.