|
|
|
Ed Bullock
|
Hi all
I have a portal showing related records from another table. The user is able to add new records via the portal (by just entering data on the next portal row) they can also delete records from the related table by clicking a button I have presented on the portal row. All very simple and works fine. The problem I have is that when a user enters data on the portal row, the next row becomes "available" for data entry. As this happens it shows the button on the portal row, so the user actually sees a delete button against a portal row that as yet has no data in it so no related record. Is there a way I can present the button in the row only when data exists in that portal row? Thanks Ed Sent from my BlackBerry® wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
Winfried Huslik
|
Edwin,
Yes there is. Use two relations, - one that allows record creation, and shows a single line (with or without a portal) for data entry and - one that does not allow record creation that shows all related records in a portal. As soon as you commit the entry, that entry moves from the entry line to the portal (preferably below the entry line - but this depends on your requirements) and the entry line is again blank for a new entry. Winfried www.fmdiff.com On 2009-07-02, at 10:59, [hidden email] wrote: > Hi all > > I have a portal showing related records from another table. > The user is able to add new records via the portal (by just > entering data on the next portal row) they can also delete records > from the related table by clicking a button I have presented on the > portal row. All very simple and works fine. > > The problem I have is that when a user enters data on the portal > row, the next row becomes "available" for data entry. As this > happens it shows the button on the portal row, so the user actually > sees a delete button against a portal row that as yet has no data > in it so no related record. > > Is there a way I can present the button in the row only when data > exists in that portal row? > > Thanks > Ed > > Sent from my BlackBerry® wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
Ed Bullock
|
In reply to this post
by Ed Bullock
Thanks for the reply and of course makes sense.
I have implemented this but the 1 line portal which allows data entry shows the first related record. Can I have a portal which allows data entry but does not show related records? Many thanks for your help Ed ------Original Message------ From: Winfried Huslik Sender: FileMaker Talk To: FileMaker Talk ReplyTo: FileMaker Talk Subject: Re: Don't show button in portal row until data is entered Sent: 2 Jul 2009 10:11 AM Edwin, Yes there is. Use two relations, - one that allows record creation, and shows a single line (with or without a portal) for data entry and - one that does not allow record creation that shows all related records in a portal. As soon as you commit the entry, that entry moves from the entry line to the portal (preferably below the entry line - but this depends on your requirements) and the entry line is again blank for a new entry. Winfried www.fmdiff.com On 2009-07-02, at 10:59, [hidden email] wrote: > Hi all > > I have a portal showing related records from another table. > The user is able to add new records via the portal (by just > entering data on the next portal row) they can also delete records > from the related table by clicking a button I have presented on the > portal row. All very simple and works fine. > > The problem I have is that when a user enters data on the portal > row, the next row becomes "available" for data entry. As this > happens it shows the button on the portal row, so the user actually > sees a delete button against a portal row that as yet has no data > in it so no related record. > > Is there a way I can present the button in the row only when data > exists in that portal row? > > Thanks > Ed > > Sent from my BlackBerry® wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ Sent from my BlackBerry® wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
Serge Schongut
|
In reply to this post
by Ed Bullock
Hi,
You could setup the relation on which the one-line portal is based to be sorted last to first: it will the show the last (empty) row Hth, Serge Schongut Elico Belgium ***Even dwarfs were born small*** ----- Original Message ----- From: <[hidden email]> To: "FileMaker Talk" <[hidden email]> Sent: Thursday, July 02, 2009 11:40 AM Subject: Re: Don't show button in portal row until data is entered > Thanks for the reply and of course makes sense. > > I have implemented this but the 1 line portal which allows data entry > shows the first related record. > > Can I have a portal which allows data entry but does not show related > records? > > Many thanks for your help > Ed > > ------Original Message------ > From: Winfried Huslik > Sender: FileMaker Talk > To: FileMaker Talk > ReplyTo: FileMaker Talk > Subject: Re: Don't show button in portal row until data is entered > Sent: 2 Jul 2009 10:11 AM > > Edwin, > > Yes there is. Use two relations, > - one that allows record creation, and shows a single line (with or > without a portal) for data entry and > - one that does not allow record creation that shows all related > records in a portal. > > As soon as you commit the entry, that entry moves from the entry line > to the portal (preferably below the entry line - but this depends on > your requirements) and the entry line is again blank for a new entry. > > > Winfried > www.fmdiff.com > > > > On 2009-07-02, at 10:59, [hidden email] wrote: > >> Hi all >> >> I have a portal showing related records from another table. >> The user is able to add new records via the portal (by just >> entering data on the next portal row) they can also delete records >> from the related table by clicking a button I have presented on the >> portal row. All very simple and works fine. >> >> The problem I have is that when a user enters data on the portal >> row, the next row becomes "available" for data entry. As this >> happens it shows the button on the portal row, so the user actually >> sees a delete button against a portal row that as yet has no data >> in it so no related record. >> >> Is there a way I can present the button in the row only when data >> exists in that portal row? >> >> Thanks >> Ed >> >> Sent from my BlackBerry® wireless device > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ > Manage your subscription: http://www.ListSearch.com/FileMaker/ > > > > > Sent from my BlackBerry® wireless device > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ > Manage your subscription: http://www.ListSearch.com/FileMaker/ > > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
VanBuskirk, Patricia
|
In reply to this post
by Ed Bullock
I use a calculated container field that looks to see if the primary key
is present on the portal line .. if not, it inserts an add button ... if it is (and the record has not been locked), it inserts a delete button. Then I've attached a script to the button to either add or delete depending on the results of an "if" statement. If you don't want to use the add button, you could have it enter "" (null). -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, July 02, 2009 4:59 AM To: FileMaker Talk Subject: Don't show button in portal row until data is entered Hi all I have a portal showing related records from another table. The user is able to add new records via the portal (by just entering data on the next portal row) they can also delete records from the related table by clicking a button I have presented on the portal row. All very simple and works fine. The problem I have is that when a user enters data on the portal row, the next row becomes "available" for data entry. As this happens it shows the button on the portal row, so the user actually sees a delete button against a portal row that as yet has no data in it so no related record. Is there a way I can present the button in the row only when data exists in that portal row? Thanks Ed Sent from my BlackBerry(r) wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
VanBuskirk, Patricia
|
Correction ... I used to have it like that ... now, I do not allow
creation or deletion through the relationship. I use an add button outside of the portal to add (using a script), and the line buttons will show a delete button if the record is not locked, or a view button if it is. Because of the relationship settings, nothing shows on blank lines. -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of VanBuskirk, Patricia Sent: Thursday, July 02, 2009 8:47 AM To: FileMaker Talk Subject: Re: Don't show button in portal row until data is entered I use a calculated container field that looks to see if the primary key is present on the portal line .. if not, it inserts an add button ... if it is (and the record has not been locked), it inserts a delete button. Then I've attached a script to the button to either add or delete depending on the results of an "if" statement. If you don't want to use the add button, you could have it enter "" (null). -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, July 02, 2009 4:59 AM To: FileMaker Talk Subject: Don't show button in portal row until data is entered Hi all I have a portal showing related records from another table. The user is able to add new records via the portal (by just entering data on the next portal row) they can also delete records from the related table by clicking a button I have presented on the portal row. All very simple and works fine. The problem I have is that when a user enters data on the portal row, the next row becomes "available" for data entry. As this happens it shows the button on the portal row, so the user actually sees a delete button against a portal row that as yet has no data in it so no related record. Is there a way I can present the button in the row only when data exists in that portal row? Thanks Ed Sent from my BlackBerry(r) wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
Ed Bullock
|
So you script the addition of a new related record, then send them to the portal? How do you go about that if you don't mind me asking?
Thanks Sent from my BlackBerry® wireless device -----Original Message----- From: "VanBuskirk, Patricia" <[hidden email]> Date: Thu, 2 Jul 2009 08:56:08 To: FileMaker Talk<[hidden email]> Subject: Re: Don't show button in portal row until data is entered Correction ... I used to have it like that ... now, I do not allow creation or deletion through the relationship. I use an add button outside of the portal to add (using a script), and the line buttons will show a delete button if the record is not locked, or a view button if it is. Because of the relationship settings, nothing shows on blank lines. -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of VanBuskirk, Patricia Sent: Thursday, July 02, 2009 8:47 AM To: FileMaker Talk Subject: Re: Don't show button in portal row until data is entered I use a calculated container field that looks to see if the primary key is present on the portal line .. if not, it inserts an add button ... if it is (and the record has not been locked), it inserts a delete button. Then I've attached a script to the button to either add or delete depending on the results of an "if" statement. If you don't want to use the add button, you could have it enter "" (null). -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, July 02, 2009 4:59 AM To: FileMaker Talk Subject: Don't show button in portal row until data is entered Hi all I have a portal showing related records from another table. The user is able to add new records via the portal (by just entering data on the next portal row) they can also delete records from the related table by clicking a button I have presented on the portal row. All very simple and works fine. The problem I have is that when a user enters data on the portal row, the next row becomes "available" for data entry. As this happens it shows the button on the portal row, so the user actually sees a delete button against a portal row that as yet has no data in it so no related record. Is there a way I can present the button in the row only when data exists in that portal row? Thanks Ed Sent from my BlackBerry(r) wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
Winfried Huslik
|
In reply to this post
by Ed Bullock
Ed,
Sorry, forgot to mention you need to do a little more to the 1 line portal relation to only show "uncommitted" records (i. e. just the record to enter). There are certainly more ways to do this, but basically it's an additional match field that is only valid as long as the record is not yet committed. In the child table: create a number field "serialOnCommit" and set it to auto-enter a serial number on commit. Create a number field "notCommitted", auto-enter, replace existing value = not ( serialOnCommit ) In the parent table: Create a global calculation g_1 = 1. Duplicate the child TO and rename it to childEntry. For the entry line create a relation from parent to childEntry that matches parentID = parentID and g_1 = notCommitted. Note: Sorting does not put the empty line on top (unfortunately). Your entry line does not necessarily need a portal, but you may use one. Winfried www.fmdiff.com On 2009-07-02, at 11:40, [hidden email] wrote: > Thanks for the reply and of course makes sense. > > I have implemented this but the 1 line portal which allows data > entry shows the first related record. > > Can I have a portal which allows data entry but does not show > related records? > > Many thanks for your help > Ed > > ------Original Message------ > From: Winfried Huslik > Sender: FileMaker Talk > To: FileMaker Talk > ReplyTo: FileMaker Talk > Subject: Re: Don't show button in portal row until data is entered > Sent: 2 Jul 2009 10:11 AM > > Edwin, > > Yes there is. Use two relations, > - one that allows record creation, and shows a single line (with or > without a portal) for data entry and > - one that does not allow record creation that shows all related > records in a portal. > > As soon as you commit the entry, that entry moves from the entry line > to the portal (preferably below the entry line - but this depends on > your requirements) and the entry line is again blank for a new entry. > > > Winfried > www.fmdiff.com > > > > On 2009-07-02, at 10:59, [hidden email] wrote: > >> Hi all >> >> I have a portal showing related records from another table. >> The user is able to add new records via the portal (by just >> entering data on the next portal row) they can also delete records >> from the related table by clicking a button I have presented on the >> portal row. All very simple and works fine. >> >> The problem I have is that when a user enters data on the portal >> row, the next row becomes "available" for data entry. As this >> happens it shows the button on the portal row, so the user actually >> sees a delete button against a portal row that as yet has no data >> in it so no related record. >> >> Is there a way I can present the button in the row only when data >> exists in that portal row? >> >> Thanks >> Ed >> >> Sent from my BlackBerry® wireless device > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ > Manage your subscription: http://www.ListSearch.com/FileMaker/ > > > > > Sent from my BlackBerry® wireless device > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ > Manage your subscription: http://www.ListSearch.com/FileMaker/ > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
Ed Bullock
|
Works perfectly! Many thanks for all your help and the example file.
Just out of curiosity is there any advantage of scripting new related records in a portal rather than using a calc method like this? Ed Sent from my BlackBerry® wireless device -----Original Message----- From: Winfried Huslik <[hidden email]> Date: Thu, 2 Jul 2009 15:27:34 To: FileMaker Talk<[hidden email]> Subject: Re: Don't show button in portal row until data is entered Ed, Sorry, forgot to mention you need to do a little more to the 1 line portal relation to only show "uncommitted" records (i. e. just the record to enter). There are certainly more ways to do this, but basically it's an additional match field that is only valid as long as the record is not yet committed. In the child table: create a number field "serialOnCommit" and set it to auto-enter a serial number on commit. Create a number field "notCommitted", auto-enter, replace existing value = not ( serialOnCommit ) In the parent table: Create a global calculation g_1 = 1. Duplicate the child TO and rename it to childEntry. For the entry line create a relation from parent to childEntry that matches parentID = parentID and g_1 = notCommitted. Note: Sorting does not put the empty line on top (unfortunately). Your entry line does not necessarily need a portal, but you may use one. Winfried www.fmdiff.com On 2009-07-02, at 11:40, [hidden email] wrote: > Thanks for the reply and of course makes sense. > > I have implemented this but the 1 line portal which allows data > entry shows the first related record. > > Can I have a portal which allows data entry but does not show > related records? > > Many thanks for your help > Ed > > ------Original Message------ > From: Winfried Huslik > Sender: FileMaker Talk > To: FileMaker Talk > ReplyTo: FileMaker Talk > Subject: Re: Don't show button in portal row until data is entered > Sent: 2 Jul 2009 10:11 AM > > Edwin, > > Yes there is. Use two relations, > - one that allows record creation, and shows a single line (with or > without a portal) for data entry and > - one that does not allow record creation that shows all related > records in a portal. > > As soon as you commit the entry, that entry moves from the entry line > to the portal (preferably below the entry line - but this depends on > your requirements) and the entry line is again blank for a new entry. > > > Winfried > www.fmdiff.com > > > > On 2009-07-02, at 10:59, [hidden email] wrote: > >> Hi all >> >> I have a portal showing related records from another table. >> The user is able to add new records via the portal (by just >> entering data on the next portal row) they can also delete records >> from the related table by clicking a button I have presented on the >> portal row. All very simple and works fine. >> >> The problem I have is that when a user enters data on the portal >> row, the next row becomes "available" for data entry. As this >> happens it shows the button on the portal row, so the user actually >> sees a delete button against a portal row that as yet has no data >> in it so no related record. >> >> Is there a way I can present the button in the row only when data >> exists in that portal row? >> >> Thanks >> Ed >> >> Sent from my BlackBerry® wireless device > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ > Manage your subscription: http://www.ListSearch.com/FileMaker/ > > > > > Sent from my BlackBerry® wireless device > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ > Manage your subscription: http://www.ListSearch.com/FileMaker/ > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
VanBuskirk, Patricia
|
In reply to this post
by Ed Bullock
Sorry for the delay ... I was torn off in another direction.
Here are the script steps I use. It basically enters all the default info and then take them to that line: (SCRIPT NAME) NONRECURRING: Portal: Add NEW Material Line to Portal Allow User Abort [ Off ] If [ NonRecurring::Open = 0 ] Show Custom Dialog [ Title: "Message"; Message: "You cannot edit this record as it has already been billed!"; Buttons: "OK" ] Exit Script [ ] Else Set Variable [ $nrid; Value:NonRecurring::_NR_ID ] Set Variable [ $won; Value:NonRecurring::WorkOrderNo ] Go to Layout [ "MaterialItems_LineItems" (NR_MaterialItems_NoFlatRt) ] New Record/Request Set Field [ NR_MaterialItems_NoFlatRt::_NR_ID; $nrid ] Set Field [ NR_MaterialItems_NoFlatRt::WorkOrderNo; $won ] Set Field [ NR_MaterialItems_NoFlatRt::TypeNRCharge; "Material" ] Set Field [ NR_MaterialItems_NoFlatRt::TypeNRItem; "Material" ] Go to Layout [ original layout ] Go to Object [ Object Name: "MaterialPortal" ] Go to Portal Row [ Select; Last ] End If -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, July 02, 2009 9:08 AM To: FileMaker Talk Subject: Re: Don't show button in portal row until data is entered So you script the addition of a new related record, then send them to the portal? How do you go about that if you don't mind me asking? Thanks Sent from my BlackBerry(r) wireless device -----Original Message----- From: "VanBuskirk, Patricia" <[hidden email]> Date: Thu, 2 Jul 2009 08:56:08 To: FileMaker Talk<[hidden email]> Subject: Re: Don't show button in portal row until data is entered Correction ... I used to have it like that ... now, I do not allow creation or deletion through the relationship. I use an add button outside of the portal to add (using a script), and the line buttons will show a delete button if the record is not locked, or a view button if it is. Because of the relationship settings, nothing shows on blank lines. -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of VanBuskirk, Patricia Sent: Thursday, July 02, 2009 8:47 AM To: FileMaker Talk Subject: Re: Don't show button in portal row until data is entered I use a calculated container field that looks to see if the primary key is present on the portal line .. if not, it inserts an add button ... if it is (and the record has not been locked), it inserts a delete button. Then I've attached a script to the button to either add or delete depending on the results of an "if" statement. If you don't want to use the add button, you could have it enter "" (null). -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, July 02, 2009 4:59 AM To: FileMaker Talk Subject: Don't show button in portal row until data is entered Hi all I have a portal showing related records from another table. The user is able to add new records via the portal (by just entering data on the next portal row) they can also delete records from the related table by clicking a button I have presented on the portal row. All very simple and works fine. The problem I have is that when a user enters data on the portal row, the next row becomes "available" for data entry. As this happens it shows the button on the portal row, so the user actually sees a delete button against a portal row that as yet has no data in it so no related record. Is there a way I can present the button in the row only when data exists in that portal row? Thanks Ed Sent from my BlackBerry(r) wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
|
VanBuskirk, Patricia
|
Whoops .. formatting got off-whack .. now corrected below (I hope)...
-----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of VanBuskirk, Patricia Sent: Thursday, July 02, 2009 10:12 AM To: FileMaker Talk Subject: Re: Don't show button in portal row until data is entered Sorry for the delay ... I was torn off in another direction. Here are the script steps I use. It basically enters all the default info and then take them to that line: (SCRIPT NAME) NONRECURRING: Portal: Add NEW Material Line to Portal Allow User Abort [ Off ] If [ NonRecurring::Open = 0 ] Show Custom Dialog [ Title: "Message"; Message: "You cannot edit this record as it has already been billed!"; Buttons: "OK" ] Exit Script [ ] Else Set Variable [ $nrid; Value:NonRecurring::_NR_ID ] Set Variable [ $won; Value:NonRecurring::WorkOrderNo ] Go to Layout [ "MaterialItems_LineItems" (NR_MaterialItems_NoFlatRt) ] New Record/Request Set Field [ NR_MaterialItems_NoFlatRt::_NR_ID; $nrid ] Set Field [ NR_MaterialItems_NoFlatRt::WorkOrderNo; $won ] Set Field [ NR_MaterialItems_NoFlatRt::TypeNRCharge; "Material" ] Set Field [ NR_MaterialItems_NoFlatRt::TypeNRItem; "Material" ] Go to Layout [ original layout ] Go to Object [ Object Name: "MaterialPortal" ] Go to Portal Row [ Select; Last ] End If -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, July 02, 2009 9:08 AM To: FileMaker Talk Subject: Re: Don't show button in portal row until data is entered So you script the addition of a new related record, then send them to the portal? How do you go about that if you don't mind me asking? Thanks Sent from my BlackBerry(r) wireless device -----Original Message----- From: "VanBuskirk, Patricia" <[hidden email]> Date: Thu, 2 Jul 2009 08:56:08 To: FileMaker Talk<[hidden email]> Subject: Re: Don't show button in portal row until data is entered Correction ... I used to have it like that ... now, I do not allow creation or deletion through the relationship. I use an add button outside of the portal to add (using a script), and the line buttons will show a delete button if the record is not locked, or a view button if it is. Because of the relationship settings, nothing shows on blank lines. -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of VanBuskirk, Patricia Sent: Thursday, July 02, 2009 8:47 AM To: FileMaker Talk Subject: Re: Don't show button in portal row until data is entered I use a calculated container field that looks to see if the primary key is present on the portal line .. if not, it inserts an add button ... if it is (and the record has not been locked), it inserts a delete button. Then I've attached a script to the button to either add or delete depending on the results of an "if" statement. If you don't want to use the add button, you could have it enter "" (null). -----Original Message----- From: FileMaker Talk [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Thursday, July 02, 2009 4:59 AM To: FileMaker Talk Subject: Don't show button in portal row until data is entered Hi all I have a portal showing related records from another table. The user is able to add new records via the portal (by just entering data on the next portal row) they can also delete records from the related table by clicking a button I have presented on the portal row. All very simple and works fine. The problem I have is that when a user enters data on the portal row, the next row becomes "available" for data entry. As this happens it shows the button on the portal row, so the user actually sees a delete button against a portal row that as yet has no data in it so no related record. Is there a way I can present the button in the row only when data exists in that portal row? Thanks Ed Sent from my BlackBerry(r) wireless device -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/FileMaker/Browse/ Manage your subscription: http://www.ListSearch.com/FileMaker/ |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |