Professional Web Applications Themes

Finding a NEW customer - FileMaker

I am trying to create a multiple find in a script for the purpose of finding a customer base that defined as NEW. New is defined as a customer that has purchased product from a given date but not prior to that date. So far I have figured out how to find a listing of those customers who have purchased product from the given date (the easy part), but how to determine and eliminate any of those customers who have purchased products prior to the date and after the date to eliminate them from the NEW definition is what I ...

  1. #1

    Default Finding a NEW customer

    I am trying to create a multiple find in a script for the purpose of
    finding a customer base that defined as NEW. New is defined as a
    customer that has purchased product from a given date but not prior to
    that date.

    So far I have figured out how to find a listing of those customers who
    have purchased product from the given date (the easy part), but how to
    determine and eliminate any of those customers who have purchased
    products prior to the date and after the date to eliminate them from
    the NEW definition is what I can't seem to resolve.

    I need a workable algorithm. What I have is the following and it
    doesn't seem to get me what I need.

    Variables

    newdate: Global date variable
    date: Date product was sold to customer

    After the user enters a date in the "newdate" field the following
    script is initiated.

    Script

    Copy [Select, "newdate"]
    Enter Find Mode[]
    Insert Text [Select,"date",">="]
    Paste ["date"]
    Modify Last Find
    Insert Text [Select,"date","<"]
    Paste ["date"]
    Perform Find[]
    _____________________

    The MODIFY LAST FIND command is used to replace the "Add New Request"
    command when processing the request manually.

    Any suggestions?

    Email responses should be sent to the following:

    [email]bailey.vcomcast.net[/email]

    thank you.

    von
    Von Bailey Guest

  2. #2

    Default Re: Finding a NEW customer

    Not real sure what you're trying to do here. Are you performing the find in
    a Customer file, or in an Orders file? If the Modify Find were replaced with
    the New Record/Request that I think you intended (more on that later), then
    your request would find all those Customers/Orders with a date >= the
    newdate AND those with a date < newdate... which comes out to any
    Customer/Order that has any date at all.

    Assuming (for the moment) that this is the Customer file, what if you had a
    "First Order" date instead of the date of their last order? You could set
    this value when the customer is set up or when the first order is placed.
    Alternately, you could create a relationship to Orders, sorted by date, and
    just pull the first date from that relationship. By searching this date,
    you'd get those whose FIRST order was after newdate, which seems to be what
    you're after.

    Some general suggestions about scripting that might help, regardless:
    -"Modify Last Find" enters the Find mode and restores the previous find
    request. I believe what you're looking for is "New Record/Request", which is
    "the 'Add New Request' command when processing the request manually"
    -Stay away from the Copy, Paste and Insert commands wherever possible. Use
    Set Field instead. Set Field doesn't require the field to be on a layout,
    and also doesn't overwrite the user's clipboard (whatever the user last
    copied or cut).
    -That being said, inserting ">=" in a date field is one of the VERY few
    instances where Set Field won't work. Instead of doing two steps, though,
    consider using Insert Calculated Result [Select, ">=" & date]

    --
    Shadenfroh

    I am trying to create a multiple find in a script for the purpose of
    finding a customer base that defined as NEW. New is defined as a
    customer that has purchased product from a given date but not prior to
    that date.

    So far I have figured out how to find a listing of those customers who
    have purchased product from the given date (the easy part), but how to
    determine and eliminate any of those customers who have purchased
    products prior to the date and after the date to eliminate them from
    the NEW definition is what I can't seem to resolve.

    I need a workable algorithm. What I have is the following and it
    doesn't seem to get me what I need.

    Variables

    newdate: Global date variable
    date: Date product was sold to customer

    After the user enters a date in the "newdate" field the following
    script is initiated.

    Script

    Copy [Select, "newdate"]
    Enter Find Mode[]
    Insert Text [Select,"date",">="]
    Paste ["date"]
    Modify Last Find
    Insert Text [Select,"date","<"]
    Paste ["date"]
    Perform Find[]
    _____________________

    The MODIFY LAST FIND command is used to replace the "Add New Request"
    command when processing the request manually.

    Any suggestions?

    Email responses should be sent to the following:

    [email]bailey.vcomcast.net[/email]

    thank you.

    von


    Shadenfroh Guest

  3. #3

    Default Re: Finding a NEW customer

    "Shadenfroh" <shadenfroh> wrote in message news:<pFilb.11847$Uz6.10981newsread1.news.atl.ear thlink.net>...
    > Not real sure what you're trying to do here. Are you performing the find in
    > a Customer file, or in an Orders file? If the Modify Find were replaced with
    > the New Record/Request that I think you intended (more on that later), then
    > your request would find all those Customers/Orders with a date >= the
    > newdate AND those with a date < newdate... which comes out to any
    > Customer/Order that has any date at all.
    >
    You are correct thanks for pointing that out. That's what I get for
    writing script before my morning hot chocolate. ;-)

    (thanks for the New Record/Request tip)

    I am working in an Orders file.
    > Assuming (for the moment) that this is the Customer file, what if you had a
    > "First Order" date instead of the date of their last order? You could set
    > this value when the customer is set up or when the first order is placed.
    > Alternately, you could create a relationship to Orders, sorted by date, and
    > just pull the first date from that relationship. By searching this date,
    > you'd get those whose FIRST order was after newdate, which seems to be what
    > you're after.
    >
    That solves my problem. As I said, I am working with an Orders file
    and I hadn't considered approaching it from the Customer direction.
    That simplifies it and I end up working with a much smaller file.

    Thanks.
    > Some general suggestions about scripting that might help, regardless:
    > -"Modify Last Find" enters the Find mode and restores the previous find
    > request. I believe what you're looking for is "New Record/Request", which is
    > "the 'Add New Request' command when processing the request manually"
    Again, thanks.
    > -Stay away from the Copy, Paste and Insert commands wherever possible. Use
    > Set Field instead. Set Field doesn't require the field to be on a layout,
    > and also doesn't overwrite the user's clipboard (whatever the user last
    > copied or cut).
    > -That being said, inserting ">=" in a date field is one of the VERY few
    > instances where Set Field won't work. Instead of doing two steps, though,
    > consider using Insert Calculated Result [Select, ">=" & date]
    >
    I tried that (i.e. Insert Calculated Result [Select, ">=" & date]) and
    it kept changing the date to a serial number. The only way I could
    get around it was to use the cut and paste option. I didn't have time
    to figure out WHY it wasn't operating correctly especially once I have
    a solution. But your point about overwriting the user's clipboard was
    something that I hadn't figured on and will have to consider before
    implementation.

    Also, thanks for the Set Field info. I haven't been using it and
    didn't know about it not having to be in a layout to work. That's
    going to come in handy in the future.

    von
    Von Bailey Guest

  4. #4

    Default Re: Finding a NEW customer

    "Von Bailey" <redbaiMailAndNews.com> wrote in message
    news:c1c1301f.0310220637.1521fc2dposting.google.c om...
    > "Shadenfroh" <shadenfroh> wrote in message
    news:<pFilb.11847$Uz6.10981newsread1.news.atl.ear thlink.net>...
    > > -Stay away from the Copy, Paste and Insert commands wherever possible.
    Use
    > > Set Field instead. Set Field doesn't require the field to be on a
    layout,
    > > and also doesn't overwrite the user's clipboard (whatever the user last
    > > copied or cut).
    > > -That being said, inserting ">=" in a date field is one of the VERY few
    > > instances where Set Field won't work. Instead of doing two steps,
    though,
    > > consider using Insert Calculated Result [Select, ">=" & date]
    > >
    > I tried that (i.e. Insert Calculated Result [Select, ">=" & date]) and
    > it kept changing the date to a serial number. The only way I could
    > get around it was to use the cut and paste option. I didn't have time
    > to figure out WHY it wasn't operating correctly especially once I have
    > a solution. But your point about overwriting the user's clipboard was
    > something that I hadn't figured on and will have to consider before
    > implementation.
    >
    Try this:

    Insert Calculated Result [Select, ">=" & DateToText (date)]


    Glenn Schwandt Guest

  5. #5

    Default Re: Finding a NEW customer

    > I tried that (i.e. Insert Calculated Result [Select, ">=" & date]) and
    > it kept changing the date to a serial number.
    Replace date with DateToText(date)
    Keith Duford Guest

Similar Threads

  1. Customer review section
    By Julian Campbell in forum Web Design
    Replies: 3
    Last Post: June 1st, 03:29 AM
  2. Pay for Customer Support?
    By psidrum in forum Macromedia Director Basics
    Replies: 1
    Last Post: February 27th, 06:47 PM
  3. Informix customer support outside U.S
    By mak in forum Informix
    Replies: 18
    Last Post: November 3rd, 09:17 PM
  4. Very Happy Customer
    By maxman23 webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 10
    Last Post: September 18th, 03:49 AM
  5. Disturbed Customer
    By davecc webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 0
    Last Post: August 5th, 01:38 PM

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