concatenating portal rows
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
Re: concatenating portal rows
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
Re: concatenating portal rows
On Wed, 11 Jul 2007 09:18:29 +0930, Chris Brown
<cbrown [at] medicine.adelaide.edu.au> wrote:
>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
Re: concatenating portal rows
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
Re: concatenating portal rows
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.fmprosolutions.com> wrote:
>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