Switching between Layouts
Switching between Layouts
am 26.10.2007 09:42:53 von JayBee
Hi
I am creating a script which copies data from one field and pastes it
to another field in a different layout.
Filemaker seems to lose the information when seitching between layouts
and pastes the last thing that was copied.
Does anybody know of a way around this?
Thanx
Re: Switching between Layouts
am 26.10.2007 14:46:05 von VoicesInMyHead
On Oct 26, 12:42 am, JayBee wrote:
> Hi
>
> I am creating a script which copies data from one field and pastes it
> to another field in a different layout.
>
> Filemaker seems to lose the information when seitching between layouts
> and pastes the last thing that was copied.
>
> Does anybody know of a way around this?
>
> Thanx
Use "Set Field" instead of copy and paste
Set Field [Layout1::Field ; Layout2::OtherField]
Much more stable.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
....amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 32 & 64Bit / FMP Adv 9.0v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The only reason some people get lost in thought
is because it's unfamiliar territory for them.
Re: Switching between Layouts
am 26.10.2007 15:08:20 von bill
In article <1193402765.716312.276150@k35g2000prh.googlegroups.com>,
VoicesInMyHead wrote:
> On Oct 26, 12:42 am, JayBee wrote:
> > Hi
> >
> > I am creating a script which copies data from one field and pastes it
> > to another field in a different layout.
> >
> > Filemaker seems to lose the information when seitching between layouts
> > and pastes the last thing that was copied.
> >
> > Does anybody know of a way around this?
> >
> > Thanx
>
> Use "Set Field" instead of copy and paste
>
> Set Field [Layout1::Field ; Layout2::OtherField]
>
> Much more stable.
>
You can use global fields or script variables (FM 8 and later) to store
the value you want to move. Then the script would have steps that look
like this:
Go to layout [SourceTable]
Set Field [MyGlobalField] = SourceTable::SourceField
Go to layout [TargetTable]
Set Field [TargetField] = MyGlobalField
or similar using a script variable rather than a global field.
Re: Switching between Layouts
am 27.10.2007 17:20:25 von fimano
For this purpose I prefer a local script variable ($theTextToCopy).
Jens Rasmussen
Fimano
Re: Switching between Layouts
am 28.10.2007 23:30:09 von JayBee
On 27 Oct, 15:20, "Jens Rasmussen, Fimano, Denmark"
wrote:
> For this purpose I prefer a local script variable ($theTextToCopy).
>
> Jens Rasmussen
> Fimano
Hi Guys
Thanx for the replies, lots of useful ideas: I think I'll use
VoicesInMyHead's suggestion; it seems simple enough and if it works
happy days!
I am using FMP7 so I don't think I can use your suggestion Bill.
Thanx
JayBee
Re: Switching between Layouts
am 30.10.2007 08:57:32 von JayBee
On 28 Oct, 22:30, JayBee wrote:
> On 27 Oct, 15:20, "Jens Rasmussen, Fimano, Denmark"
> wrote:
>
> > For this purpose I prefer a local script variable ($theTextToCopy).
>
> > Jens Rasmussen
> > Fimano
>
> Hi Guys
>
> Thanx for the replies, lots of useful ideas: I think I'll use
> VoicesInMyHead's suggestion; it seems simple enough and if it works
> happy days!
>
> I am using FMP7 so I don't think I can use your suggestion Bill.
>
> Thanx
> JayBee
Hi
To VoicesInMyHead. Where do you put the line
SetField[Layout1::Field;Layout2::Otherfield] - in the script it only
lets you set one field.
Thanx
Jenny
Re: Switching between Layouts
am 30.10.2007 17:47:56 von VoicesInMyHead
> To VoicesInMyHead. Where do you put the line
> SetField[Layout1::Field;Layout2::Otherfield] - in the script it only
> lets you set one field.
This should be the same in v7 as later versions (I'm on v9). If I
remember correctly... Someone with v7 can correct me if I'm wrong:
Add Set Field to your script
Check the "Specify Target Field" box
Select the desired layout from the drop down list
Select the field you want to place the information in
Click the Specify... button for Calculated Result
Select the desired layout from the drop down list
Select the field that hold the information you want to "copy"
(Of course, you can use a calculation to combine fields or whatever
in the calculation box, but for what you were asking about, you can
simply select the desired field.)
That should be it - the Set Field line of your script should show both
fields on the same line.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
....amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 32 & 64Bit / FMP Adv 9.0v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The only reason some people get lost in thought
is because it's unfamiliar territory for them.
Re: Switching between Layouts
am 31.10.2007 01:48:05 von VoicesInMyHead
> To VoicesInMyHead. Where do you put the line
> SetField[Layout1::Field;Layout2::Otherfield] - in the script it only
> lets you set one field.
>
> Thanx
> Jenny
This should be the same in v7 as later versions (I'm on v9). If I
remember correctly...Someone with v7 can correct me if I am wrong:
Add Set Field to your script
Check the "Specify Target Field" box
Select the desired layout from the drop down list
Select the field you want to place the information in
Click the Specify... button for Calculated Result
Select the desired layout from the drop down list
Select the field that hold the information you want to "copy"
(Of course, you can use a calculation to combine fields or whatever
in the calculation box, but for what you were asking about, you can
simply select the desired field.)
That should be it - the Set Field line of your script should show both
fields on the same line.