create a new record from a portal

FMP 9

I am trying to create a new record from a portal in my main table
"Brief"

The portal creates and stores "QuoteRequests" which are sent to many
suppliers this table holds the BriefNo and creates a RequestNo
When the client decides who wins the Order I have set a button to take
the BriefNo and RequestNo over to the "PurchaseOrder" table and place
it in a new record. I have the other fields set to look up the
details based on a relationship of BriefNo AND QuoteNo

This is my script which does not bring the put the BriefNo or
RequestNo over, I also tried copying the info and pasting but still
did not work either.

Adjust Window [Maxmize]
Freeze Window
Got to Related Record [Show only related records; From table:
"QuoteRequest"; Using Layout "QuoteRequest"]
Go to Layout ["PurchaseOrder"[PurchaseOrder]
New Record/Request
Set Field [PurchaseOrder::BriefNo; QuoteRequest::BriefNo]
Set Field [PurchaseOrder::RequestNo; QuoteRequest::BriefNo]

Thanks so much in advance for helping me :0)

Toni
tm [ Do, 09 August 2007 11:09 ] [ ID #1790415 ]

Re: create a new record from a portal

"tm" <eshopstall [at] optusnet.com.au> schreef in bericht
news:1186650550.951083.124560 [at] x35g2000prf.googlegroups.com.. .
> FMP 9
>
> I am trying to create a new record from a portal in my main table
> "Brief"
>
> The portal creates and stores "QuoteRequests" which are sent to many
> suppliers this table holds the BriefNo and creates a RequestNo
> When the client decides who wins the Order I have set a button to take
> the BriefNo and RequestNo over to the "PurchaseOrder" table and place
> it in a new record. I have the other fields set to look up the
> details based on a relationship of BriefNo AND QuoteNo
>
> This is my script which does not bring the put the BriefNo or
> RequestNo over, I also tried copying the info and pasting but still
> did not work either.
>
> Adjust Window [Maxmize]
> Freeze Window
> Got to Related Record [Show only related records; From table:
> "QuoteRequest"; Using Layout "QuoteRequest"]
> Go to Layout ["PurchaseOrder"[PurchaseOrder]
> New Record/Request
> Set Field [PurchaseOrder::BriefNo; QuoteRequest::BriefNo]
> Set Field [PurchaseOrder::RequestNo; QuoteRequest::BriefNo]
>
> Thanks so much in advance for helping me :0)
>
> Toni


I think you might want to re-think your consept. First: Don't ever use
copy/paste with scripts. If any process or any users uses the clipboard you
will loose your data stored there. Then you are going do duplicate a lot of
information you already have stored somewhere.

You have a goto related. that also goes to a layout. The next step you go to
a different table and layout. Loosing any coherent way for looking back to
the first table. You just have to store the values somewhere

Goto Related Record [Show only related records; From table: "QuoteRequest";
Using Layout "QuoteRequest"]
Set Variable [$BN ; BriefNo ]

Then goto you new layout and create new record
Set Field [PurchaseOrder::BriefNo; $BN]
Set Field [PurchaseOrder::RequestNo; $BN]

Since BriefNo and RequestNo will hold the same value I don't see the use for
this double action...

Anyway, I hope this did help.
Keep well, Ursus
ursus.kirk [ Do, 09 August 2007 12:18 ] [ ID #1790416 ]

Re: create a new record from a portal

On Aug 9, 8:18 pm, "Ursus" <ursus.k... [at] wanadoo.nl> wrote:
> "tm" <eshopst... [at] optusnet.com.au> schreef in berichtnews:1186650550.951083.124560 [at] x35g2000prf.googlegroup s.com...
>
>
>
>
>
> > FMP 9
>
> > I am trying to create a new record from a portal in my main table
> > "Brief"
>
> > The portal creates and stores "QuoteRequests" which are sent to many
> > suppliers this table holds the BriefNo and creates a RequestNo
> > When the client decides who wins the Order I have set a button to take
> > the BriefNo and RequestNo over to the "PurchaseOrder" table and place
> > it in a new record. I have the other fields set to look up the
> > details based on a relationship of BriefNo AND QuoteNo
>
> > This is my script which does not bring the put the BriefNo or
> > RequestNo over, I also tried copying the info and pasting but still
> > did not work either.
>
> > Adjust Window [Maxmize]
> > Freeze Window
> > Got to Related Record [Show only related records; From table:
> > "QuoteRequest"; Using Layout "QuoteRequest"]
> > Go to Layout ["PurchaseOrder"[PurchaseOrder]
> > New Record/Request
> > Set Field [PurchaseOrder::BriefNo; QuoteRequest::BriefNo]
> > Set Field [PurchaseOrder::RequestNo; QuoteRequest::BriefNo]
>
> > Thanks so much in advance for helping me :0)
>
> > Toni
>
> I think you might want to re-think your consept. First: Don't ever use
> copy/paste with scripts. If any process or any users uses the clipboard you
> will loose your data stored there. Then you are going do duplicate a lot of
> information you already have stored somewhere.
>
> You have a goto related. that also goes to a layout. The next step you go to
> a different table and layout. Loosing any coherent way for looking back to
> the first table. You just have to store the values somewhere
>
> Goto Related Record [Show only related records; From table: "QuoteRequest";
> Using Layout "QuoteRequest"]
> Set Variable [$BN ; BriefNo ]
>
> Then goto you new layout and create new record
> Set Field [PurchaseOrder::BriefNo; $BN]
> Set Field [PurchaseOrder::RequestNo; $BN]
>
> Since BriefNo and RequestNo will hold the same value I don't see the use for
> this double action...
>
> Anyway, I hope this did help.
> Keep well, Ursus- Hide quoted text -
>
> - Show quoted text -

Thanks so much Ursus for responding and for your advice.
The relationship is based on BriefNo AND RequestNo
BriefNo ties the info back to the job sheet and RequestNo the quote
which was sent (they are different numbers)...
I am taking information from both tables to the Purchase Order.

I tried the your script which works to bring the BriefNo in but I can
not get the RequestNo
Would you be so kind to tell me what I need to do.

Thanks!
Toni :0)
tm [ Do, 09 August 2007 13:31 ] [ ID #1790417 ]

Re: create a new record from a portal

In article <1186650550.951083.124560 [at] x35g2000prf.googlegroups.com>, tm
<eshopstall [at] optusnet.com.au> wrote:

> FMP 9
>
> I am trying to create a new record from a portal in my main table
> "Brief"
>
> The portal creates and stores "QuoteRequests" which are sent to many
> suppliers this table holds the BriefNo and creates a RequestNo
> When the client decides who wins the Order I have set a button to take
> the BriefNo and RequestNo over to the "PurchaseOrder" table and place
> it in a new record. I have the other fields set to look up the
> details based on a relationship of BriefNo AND QuoteNo
>
> This is my script which does not bring the put the BriefNo or
> RequestNo over, I also tried copying the info and pasting but still
> did not work either.
>
> Adjust Window [Maxmize]
> Freeze Window
> Got to Related Record [Show only related records; From table:
> "QuoteRequest"; Using Layout "QuoteRequest"]
> Go to Layout ["PurchaseOrder"[PurchaseOrder]
> New Record/Request
> Set Field [PurchaseOrder::BriefNo; QuoteRequest::BriefNo]
> Set Field [PurchaseOrder::RequestNo; QuoteRequest::BriefNo]
>
> Thanks so much in advance for helping me :0)
>
> Toni

If the Relationship for the Portal is set to allow the creation of
related records (ie. has a blank row at the bottom for users to click
in), then the script is a very simple case of going to the last row and
putting data into a related field.
eg
Go To Portal Row [Last]
Set Field [Relationship::RelatedField, "MyData"]

FileMaker itself will handle correctly setting the fields that define
the Relationship. The field RelatedField doesn't even need to be in the
Portal row for this to work.

If there's more than one Portal on the current Layout, you'll need to
make sure you're in the correct Portal first by using the Go To Field
command.
eg.
Go To Field [Relationship::RelatedField_A]
Go To Portal Row [Last]
Set Field [Relationship::RelatedField_B, "MyData"]

RelatedField_A and RelatedField_B may or may not be the same field.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
Helpful Harry [ Fr, 10 August 2007 09:09 ] [ ID #1791665 ]

Re: create a new record from a portal

>> Goto Related Record [Show only related records; From table:
>> "QuoteRequest";
>> Using Layout "QuoteRequest"]
>> Set Variable [$BN ; BriefNo ]
>>
>> Then goto you new layout and create new record
>> Set Field [PurchaseOrder::BriefNo; $BN]
>> Set Field [PurchaseOrder::RequestNo; $BN]
>>
>> Since BriefNo and RequestNo will hold the same value I don't see the use
>> for
>> this double action...
>>
>> Anyway, I hope this did help.
>> Keep well, Ursus- Hide quoted text -
>>
>> - Show quoted text -
>
> Thanks so much Ursus for responding and for your advice.
> The relationship is based on BriefNo AND RequestNo
> BriefNo ties the info back to the job sheet and RequestNo the quote
> which was sent (they are different numbers)...
> I am taking information from both tables to the Purchase Order.
>
> I tried the your script which works to bring the BriefNo in but I can
> not get the RequestNo
> Would you be so kind to tell me what I need to do.

Toni, Shouldn't be to difficult to work out. I have shown you the Set
Variable AND the Set field functions
Add one Set Variable at the correct point in the script (give it any new
$name you want). Give it the correct value.
Change the second Set Field so that it represents the new variable

Keep well, Ursus
ursus.kirk [ Fr, 10 August 2007 11:24 ] [ ID #1791667 ]
Datenbanken » comp.databases.filemaker » create a new record from a portal

Vorheriges Thema: External Data Source and Refresh Window
Nächstes Thema: Web viewer setup-Ebay search