dbTalk Databases Forums  

concatenating portal rows

comp.databases.filemaker comp.databases.filemaker


Discuss concatenating portal rows in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
FastWolf
 
Posts: n/a

Default concatenating portal rows - 07-10-2007 , 04:11 PM






I need to concatenate the values in several portal rows into a single
row and export the single row. Not only that, I need to place a
particular delimiter (a colon) between the various rows' values when
they go into the single row.

Something like this:

field: [portal row 1]
[portal row 2]
[portal row 3]

.... becomes:

field: [portal row value1]:[portal row value2]:[portal row value3]

This one has had me stumped.

thanks in advance

--
FW

FMP 8, Windows XP Pro SP2

Reply With Quote
  #2  
Old   
Chris Brown
 
Posts: n/a

Default Re: concatenating portal rows - 07-10-2007 , 06:48 PM






FastWolf wrote:
Quote:
I need to concatenate the values in several portal rows into a single
row and export the single row. Not only that, I need to place a
particular delimiter (a colon) between the various rows' values when
they go into the single row.

Something like this:

field: [portal row 1]
[portal row 2]
[portal row 3]

... becomes:

field: [portal row value1]:[portal row value2]:[portal row value3]

This one has had me stumped.

thanks in advance


If you wanted to parse multiple fields from a singel portal row,
something like this:

set $$_ROW = RelA_F1 & ":" & RelA_F2 &":" & RelA_F3


As you want to parse the same field from multiple portal rows, you have
to somehow nominate the rows, or compile a series of click grabs. I
can think of several ways.


The simplest, and to show yourself the principle, and that it works,
would to create a new field to hold the output (g_Result). It can be a
global.


Create a script, and add a button to the portal row.
clicking the row adds the target field value to the g_Result

parse F1
Set Field [ TableA::g_result; If(IsEmpty(TableA::g_result); TableB::F1;
TableA::g_result & "¶" & TableB::F1) ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]


the variation for single row output, is substitute a colon for the
pilcrow in the set field calc



parse F1
Set Field [ TableA::g_result; If(IsEmpty(TableA::g_result); TableB::F1;
TableA::g_result & ":" & TableB::F1) ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]



plenty of other ways to configure the actual extraction, but this is the
basis for grabbing the values


regards

Chris


Reply With Quote
  #3  
Old   
FastWolf
 
Posts: n/a

Default Re: concatenating portal rows - 07-11-2007 , 07:28 AM



On Wed, 11 Jul 2007 09:18:29 +0930, Chris Brown
<cbrown (AT) medicine (DOT) adelaide.edu.au> wrote:

Quote:
FastWolf wrote:
I need to concatenate the values in several portal rows into a single
row and export the single row. Not only that, I need to place a
particular delimiter (a colon) between the various rows' values when
they go into the single row.

Something like this:

field: [portal row 1]
[portal row 2]
[portal row 3]

... becomes:

field: [portal row value1]:[portal row value2]:[portal row value3]

This one has had me stumped.

thanks in advance



If you wanted to parse multiple fields from a singel portal row,
something like this:

set $$_ROW = RelA_F1 & ":" & RelA_F2 &":" & RelA_F3


As you want to parse the same field from multiple portal rows, you have
to somehow nominate the rows, or compile a series of click grabs. I
can think of several ways.


The simplest, and to show yourself the principle, and that it works,
would to create a new field to hold the output (g_Result). It can be a
global.


Create a script, and add a button to the portal row.
clicking the row adds the target field value to the g_Result

parse F1
Set Field [ TableA::g_result; If(IsEmpty(TableA::g_result); TableB::F1;
TableA::g_result & "¶" & TableB::F1) ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]


the variation for single row output, is substitute a colon for the
pilcrow in the set field calc



parse F1
Set Field [ TableA::g_result; If(IsEmpty(TableA::g_result); TableB::F1;
TableA::g_result & ":" & TableB::F1) ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]



plenty of other ways to configure the actual extraction, but this is the
basis for grabbing the values


regards

Chris
Chris,

Your suggestion works perfectly! Many thanks to you for taking the
time to reply to my post and educate me a little bit more about FMP.

Thanks again

--
FW


Reply With Quote
  #4  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: concatenating portal rows - 07-11-2007 , 10:20 AM



If you're in FM8.5 or higher, you might have a look at the List()
function and use it in conjunction with a concatenated field in your
related table.

FastWolf wrote:
Quote:
I need to concatenate the values in several portal rows into a single
row and export the single row. Not only that, I need to place a
particular delimiter (a colon) between the various rows' values when
they go into the single row.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Member, FileMaker Business Alliance


Reply With Quote
  #5  
Old   
FastWolf
 
Posts: n/a

Default Re: concatenating portal rows - 07-11-2007 , 09:02 PM




Well, the db in question is hosted on a machine running FMP 8.0, but
all the clients run FMP 8.5. We never administrate the db on the host
machine, only from a client. Actually I don't know if a script using
8.5 features invoked from a client running 8.5 would work on the 8.0
host -- but I'm sure that you do, Mr Schlossberg. However, I
suspect that it would not.

I'll take a good look at your suggestion, even though this is kind of
a sensitive db. The end user's attitude has been "if it ain't broke
don't fix it" and so far I've been inclined to agree. But I'm sure I
could upgrade the host to 8.5 if there's a good reason.

thanks

--
FW


On Wed, 11 Jul 2007 08:20:42 -0700, Howard Schlossberg
<howard (AT) nospam (DOT) fmprosolutions.com> wrote:

Quote:
If you're in FM8.5 or higher, you might have a look at the List()
function and use it in conjunction with a concatenated field in your
related table.

FastWolf wrote:
I need to concatenate the values in several portal rows into a single
row and export the single row. Not only that, I need to place a
particular delimiter (a colon) between the various rows' values when
they go into the single row.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Member, FileMaker Business Alliance

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.