Professional Web Applications Themes

2 questions :) - portal questions - FileMaker

Say the portal displays a relationship that uses the Box_ID field as the match field on both sides. In the child file (items in the box), add two fields: 'In', a number field defined to auto enter with a value of 1, and 'BoxID_In', a stored calculation, returning text, defined as: Box_ID & " " & In ....so, an item whose Box_ID is '4578' and is still in the box would return 4578 1. In the parent file ('Boxes'), create a similar text calc ('BoxID_1'--need not be stored) defined as: Box_ID & " 1" ....and create a portal that displays ...

  1. #1

    Default Re: 2 questions :) - portal questions

    Say the portal displays a relationship that uses the Box_ID field as the
    match field on both sides. In the child file (items in the box), add two
    fields: 'In', a number field defined to auto enter with a value of 1, and
    'BoxID_In', a stored calculation, returning text, defined as:

    Box_ID & " " & In

    ....so, an item whose Box_ID is '4578' and is still in the box would return
    4578 1. In the parent file ('Boxes'), create a similar text calc
    ('BoxID_1'--need not be stored) defined as:

    Box_ID & " 1"

    ....and create a portal that displays a relationship ('Full') from BoxID_1
    to BoxID_In. You can display In in the portal row, formatted with a single
    checkbox (using a value list with 1 as the only value). When an item's In
    field is toggled off, it will fall out of the relationship.

    You can use the Aggregate functions (Sum and Count) across the two
    relationships to count items and boxes. Thus:

    Sum(Full::In)

    ....will return a count of items, as will, in this case, Count(Full::In). If
    there is a quantity field, i.e., 6 of an item, then:

    Sum(Full::Quantity)

    ....will return that total.

    --
    John Weinshel
    Datagrace
    Vashon Island, WA
    (206) 463-1634
    Associate Member, Filemaker Solutions Alliance


    "gwmbox" <gregatworkNOSPAMPLEASEhotmail.com> wrote in message
    news:3f12092c$1quokka.wn.com.au...
    > Hi
    >
    > Fm Dev 5.5v1 on Win Xp Pro
    >
    > I have two related files, one is the details about a box and the other is
    > the items within the box - they are seperate as we track the box and the
    > contents seperately.
    >
    > Anyway we have the ability to remove items from a box and when these are
    > done they are marked removed which is fine (they however remain on the
    > system for tracking and are still linked to the box, but how do I in the
    box
    > view in the portal view only display the items that have not been removed,
    > i.e. to not list the items removed.
    >
    > Also is it possible to do a count on portal items - i.e. how many items
    are
    > in the box and if it reaches zero then we can identify on the system the
    box
    > is empty and then allow us to mark the box as removed.
    >
    > Thanks
    >
    > Greg
    >
    >

    John Weinshel Guest

  2. #2

    Default Re: 2 questions :) - portal questions

    John

    many thanks - that fixed it :)

    Just one more question - I have a portal that will also now show those that
    are in and are removed at the same time, is there a way to change the text
    colour of the record displayed in the portal for the removed items.

    That being is if removed = yes display that record with grey text or
    background grey or something that will show in a list those that are listed
    as removed

    Thanks

    Greg

    "John Weinshel" <johndatagrace.biz> wrote in message
    news:vh44a9l4f13ef7news.supernews.com...
    > Say the portal displays a relationship that uses the Box_ID field as the
    > match field on both sides. In the child file (items in the box), add two
    > fields: 'In', a number field defined to auto enter with a value of 1, and
    > 'BoxID_In', a stored calculation, returning text, defined as:
    >
    > Box_ID & " " & In
    >
    > ...so, an item whose Box_ID is '4578' and is still in the box would return
    > 4578 1. In the parent file ('Boxes'), create a similar text calc
    > ('BoxID_1'--need not be stored) defined as:
    >
    > Box_ID & " 1"
    >
    > ...and create a portal that displays a relationship ('Full') from BoxID_1
    > to BoxID_In. You can display In in the portal row, formatted with a single
    > checkbox (using a value list with 1 as the only value). When an item's In
    > field is toggled off, it will fall out of the relationship.
    >
    > You can use the Aggregate functions (Sum and Count) across the two
    > relationships to count items and boxes. Thus:
    >
    > Sum(Full::In)
    >
    > ...will return a count of items, as will, in this case, Count(Full::In).
    If
    > there is a quantity field, i.e., 6 of an item, then:
    >
    > Sum(Full::Quantity)
    >
    > ...will return that total.
    >
    > --
    > John Weinshel
    > Datagrace
    > Vashon Island, WA
    > (206) 463-1634
    > Associate Member, Filemaker Solutions Alliance
    >
    >
    > "gwmbox" <gregatworkNOSPAMPLEASEhotmail.com> wrote in message
    > news:3f12092c$1quokka.wn.com.au...
    > > Hi
    > >
    > > Fm Dev 5.5v1 on Win Xp Pro
    > >
    > > I have two related files, one is the details about a box and the other
    is
    > > the items within the box - they are seperate as we track the box and the
    > > contents seperately.
    > >
    > > Anyway we have the ability to remove items from a box and when these are
    > > done they are marked removed which is fine (they however remain on the
    > > system for tracking and are still linked to the box, but how do I in the
    > box
    > > view in the portal view only display the items that have not been
    removed,
    > > i.e. to not list the items removed.
    > >
    > > Also is it possible to do a count on portal items - i.e. how many items
    > are
    > > in the box and if it reaches zero then we can identify on the system the
    > box
    > > is empty and then allow us to mark the box as removed.
    > >
    > > Thanks
    > >
    > > Greg
    > >
    > >
    >
    >

    gwmbox Guest

  3. #3

    Default Re: 2 questions :) - portal questions

    Unfortunately, you cannot control any text format attributes (color, font,
    etc.) with calcs or scripts. All you can do is place a calculated container
    field 'behind' the field in question. For that, you need to create (in the
    child file) one or two global container fields (two if you want two
    different backgrounds, one if you want to toggle between no background and
    the container background), and then create a calculation, returning a
    container, defined roughly as:

    Case(In =1, Container1, Container2)

    or

    Case(In <>1, Container2)

    ....for one color.

    Note that this calc, because container fields cannot be stored, will itself
    be unstored, and be wary of displaying tall portals with them, particularly
    in a shared environment, as you are likely to see long screen re-draws.

    If you do use this technique, format the foremost field (the one with the
    text, not the calculated container) to not allow entry; otherwise, the
    containers will not display properly when the portal is scrolled.

    --
    John Weinshel
    Datagrace
    Vashon Island, WA
    (206) 463-1634
    Associate Member, Filemaker Solutions Alliance


    "gwmbox" <gregatworkNOSPAMPLEASEhotmail.com> wrote in message
    news:3f122789$1quokka.wn.com.au...
    > John
    >
    > many thanks - that fixed it :)
    >
    > Just one more question - I have a portal that will also now show those
    that
    > are in and are removed at the same time, is there a way to change the text
    > colour of the record displayed in the portal for the removed items.
    >
    > That being is if removed = yes display that record with grey text or
    > background grey or something that will show in a list those that are
    listed
    > as removed
    >
    > Thanks
    >
    > Greg
    >
    > "John Weinshel" <johndatagrace.biz> wrote in message
    > news:vh44a9l4f13ef7news.supernews.com...
    > > Say the portal displays a relationship that uses the Box_ID field as the
    > > match field on both sides. In the child file (items in the box), add two
    > > fields: 'In', a number field defined to auto enter with a value of 1,
    and
    > > 'BoxID_In', a stored calculation, returning text, defined as:
    > >
    > > Box_ID & " " & In
    > >
    > > ...so, an item whose Box_ID is '4578' and is still in the box would
    return
    > > 4578 1. In the parent file ('Boxes'), create a similar text calc
    > > ('BoxID_1'--need not be stored) defined as:
    > >
    > > Box_ID & " 1"
    > >
    > > ...and create a portal that displays a relationship ('Full') from
    BoxID_1
    > > to BoxID_In. You can display In in the portal row, formatted with a
    single
    > > checkbox (using a value list with 1 as the only value). When an item's
    In
    > > field is toggled off, it will fall out of the relationship.
    > >
    > > You can use the Aggregate functions (Sum and Count) across the two
    > > relationships to count items and boxes. Thus:
    > >
    > > Sum(Full::In)
    > >
    > > ...will return a count of items, as will, in this case, Count(Full::In).
    > If
    > > there is a quantity field, i.e., 6 of an item, then:
    > >
    > > Sum(Full::Quantity)
    > >
    > > ...will return that total.
    > >
    > > --
    > > John Weinshel
    > > Datagrace
    > > Vashon Island, WA
    > > (206) 463-1634
    > > Associate Member, Filemaker Solutions Alliance
    > >
    > >
    > > "gwmbox" <gregatworkNOSPAMPLEASEhotmail.com> wrote in message
    > > news:3f12092c$1quokka.wn.com.au...
    > > > Hi
    > > >
    > > > Fm Dev 5.5v1 on Win Xp Pro
    > > >
    > > > I have two related files, one is the details about a box and the other
    > is
    > > > the items within the box - they are seperate as we track the box and
    the
    > > > contents seperately.
    > > >
    > > > Anyway we have the ability to remove items from a box and when these
    are
    > > > done they are marked removed which is fine (they however remain on the
    > > > system for tracking and are still linked to the box, but how do I in
    the
    > > box
    > > > view in the portal view only display the items that have not been
    > removed,
    > > > i.e. to not list the items removed.
    > > >
    > > > Also is it possible to do a count on portal items - i.e. how many
    items
    > > are
    > > > in the box and if it reaches zero then we can identify on the system
    the
    > > box
    > > > is empty and then allow us to mark the box as removed.
    > > >
    > > > Thanks
    > > >
    > > > Greg
    > > >
    > > >
    > >
    > >
    >
    >

    John Weinshel Guest

  4. #4

    Default Re: 2 questions :) - portal questions

    In article <3f122789$1quokka.wn.com.au>, "gwmbox"
    <gregatworkNOSPAMPLEASEhotmail.com> wrote:
    > John
    >
    > many thanks - that fixed it :)
    >
    > Just one more question - I have a portal that will also now show those that
    > are in and are removed at the same time, is there a way to change the text
    > colour of the record displayed in the portal for the removed items.
    >
    > That being is if removed = yes display that record with grey text or
    > background grey or something that will show in a list those that are listed
    > as removed
    Unfortunately you can't change the colour of text in a field (or any
    other format options) except when in Layout mode. :o(

    The best you can do is to replace each normal data field in the portal
    with two calculated fields that are placed on top of each other (the
    top one needs to be transparent). One field equals the normal data only
    when it's in the box and is formatted on the layout as green text. The
    other field equals the normal data only when it's removed from the box
    as is formatted on the layout as red text.

    This would work, but would make it difficult if you're using the portal
    for entering/editing data.

    A better way is to use the background colour idea. First you need to
    have a global container field (gRemovedBackground) in the related file
    into which you paste a small grey-filled and grey-bordered square - or
    whatever colour you want. Once you've stored the coloured square in
    this field you can delete it from the layout.

    Now create a new calculated in the related file field and put it behind
    the portal row that returns a container result.
    eg.
    Background = If(Removed="Yes", gRemovedBackground, "")

    Make sure this field has the graphic format option set to Enlarge and
    NOT keep the proportions.

    Helpful Harry
    "Just trying to help whenever I can." :o)
    Helpful Harry Guest

Similar Threads

  1. Help! Many questions...
    By Stefan Walker in forum PHP Development
    Replies: 0
    Last Post: April 29th, 07:55 AM
  2. Questions
    By KAS81 in forum Macromedia Director Basics
    Replies: 2
    Last Post: April 15th, 07:07 PM
  3. 2 questions please
    By Michael Timbel in forum Web Design
    Replies: 0
    Last Post: December 17th, 06:34 PM
  4. SSL and ASP.net questions
    By Cliff Harris in forum ASP.NET Security
    Replies: 1
    Last Post: September 26th, 04:03 PM
  5. Oracle Portal (procedure PORTAL.home)
    By Simo in forum Oracle Server
    Replies: 0
    Last Post: December 12th, 11:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139