Professional Web Applications Themes

Insert TAB into calculated field - FileMaker

I'm trying to create a function with FM Pro 4.1 where a user can click a button on a screen causing a group of five fields to be copied into the clipboard, and then switch to Excel to paste the values into horizontally consecutive cells. I've created a calculated field that contains the concatenated text of the five fields, separated by the "paragraph" mark. I also created a button with a script that puts the contents of this field into the clipboard. When the user goes to Excel and selects a cell, the five values copy to vertically adjacent cells, ...

  1. #1

    Default Insert TAB into calculated field

    I'm trying to create a function with FM Pro 4.1 where a user can click a
    button on a screen causing a group of five fields to be copied into the
    clipboard, and then switch to Excel to paste the values into horizontally
    consecutive cells. I've created a calculated field that contains the
    concatenated text of the five fields, separated by the "paragraph" mark. I
    also created a button with a script that puts the contents of this field
    into the clipboard. When the user goes to Excel and selects a cell, the
    five values copy to vertically adjacent cells, not horizontally, even though
    I've set the Excel prefs to "move right" with the Return key.

    So I'm thinking if I could separate the data with a TAB key instead of the
    paragraph mark, that might do the trick. So far I can't figure out how to
    do that. Can it be done?

    By the way, my workaround in Excel is to create a macro that places the data
    vertically off to the side of the spreadsheet, and then does a Copy - Paste
    Special - Transpose to the desired cell. It works, but it does have some
    undesireable side effects - like using cells way off to the side, which
    causes the spreadsheet to scroll right when the macro is activated.

    Another question: I have found that the Filemaker calculated field must be
    visible on the layout or else the button doesn't work. Why would that be?
    The script is very simple: just Copy(Select,Fieldname). If the field is on
    the layout, it becomes the active field when the button is clicked. If it
    is not on the layout, the clipboard does not get updated when the button is
    clicked.


    Don Guest

  2. #2

    Default Re: Insert TAB into calculated field

    in article 48GZa.119128$YN5.84210sccrnsc01, Don at
    [email]reply.to.groupsaynotospam.com[/email] wrote on 11/8/03 3:49 PM:
    > I'm trying to create a function with FM Pro 4.1 where a user can click a
    > button on a screen causing a group of five fields to be copied into the
    > clipboard, and then switch to Excel to paste the values into horizontally
    > consecutive cells. I've created a calculated field that contains the
    > concatenated text of the five fields, separated by the "paragraph" mark. I
    > also created a button with a script that puts the contents of this field
    > into the clipboard. When the user goes to Excel and selects a cell, the
    > five values copy to vertically adjacent cells, not horizontally, even though
    > I've set the Excel prefs to "move right" with the Return key.
    >
    > So I'm thinking if I could separate the data with a TAB key instead of the
    > paragraph mark, that might do the trick. So far I can't figure out how to
    > do that. Can it be done?
    Yep, tabs move between fields in a record and are equivalent to the columns
    of a table whereas returns represent breaks between records and are
    equivalent to the rows of a table
    >
    > By the way, my workaround in Excel is to create a macro that places the data
    > vertically off to the side of the spreadsheet, and then does a Copy - Paste
    > Special - Transpose to the desired cell. It works, but it does have some
    > undesireable side effects - like using cells way off to the side, which
    > causes the spreadsheet to scroll right when the macro is activated.
    >
    > Another question: I have found that the Filemaker calculated field must be
    > visible on the layout or else the button doesn't work. Why would that be?
    > The script is very simple: just Copy(Select,Fieldname). If the field is on
    > the layout, it becomes the active field when the button is clicked. If it
    > is not on the layout, the clipboard does not get updated when the button is
    > clicked.
    Script steps such as copy and paste require that a field be on a layout to
    work - Set Field does not require this and is much more powerful and
    versatile. The calc would look like:

    Field 1 & "(tab)" & Field 2 & "(tab)" & Field 3 & "(tab)" & Field 4 &
    "(tab)" Field 5 & "(tab)"

    (where (tab) is a tab copied from a text editor)

    Bridget Eley

    Bridget Eley Guest

  3. #3

    Default Re: Insert TAB into calculated field

    In article <48GZa.119128$YN5.84210sccrnsc01>, "Don"
    <reply.to.groupsaynotospam.com> wrote:
    > I'm trying to create a function with FM Pro 4.1 where a user can click a
    > button on a screen causing a group of five fields to be copied into the
    > clipboard, and then switch to Excel to paste the values into horizontally
    > consecutive cells. I've created a calculated field that contains the
    > concatenated text of the five fields, separated by the "paragraph" mark. I
    > also created a button with a script that puts the contents of this field
    > into the clipboard. When the user goes to Excel and selects a cell, the
    > five values copy to vertically adjacent cells, not horizontally, even though
    > I've set the Excel prefs to "move right" with the Return key.
    >
    > So I'm thinking if I could separate the data with a TAB key instead of the
    > paragraph mark, that might do the trick. So far I can't figure out how to
    > do that. Can it be done?
    >
    > By the way, my workaround in Excel is to create a macro that places the data
    > vertically off to the side of the spreadsheet, and then does a Copy - Paste
    > Special - Transpose to the desired cell. It works, but it does have some
    > undesireable side effects - like using cells way off to the side, which
    > causes the spreadsheet to scroll right when the macro is activated.
    The easiest way is probably to create a global text field and
    paste/type a single tab into that, then use that field in your
    calculation whenever you need a tab.
    eg. Field1 & gTab & field2 & gTab & Field 3

    Note: to type a tab in FileMaker text fields you need to press Option
    Tab on the Mac (for Windows it might be Control Tab) since pressing
    just Tab will go to the next field in the tab order.


    > Another question: I have found that the Filemaker calculated field must be
    > visible on the layout or else the button doesn't work. Why would that be?
    > The script is very simple: just Copy(Select,Fieldname). If the field is on
    > the layout, it becomes the active field when the button is clicked. If it
    > is not on the layout, the clipboard does not get updated when the button is
    > clicked.
    To use the copy or paste script steps the fields need to be on the
    layout - this is because the script steps basically do the same as you
    would with the mouse (select text and copy, or insert cursor and
    paste).

    There's no real way around this for what you doing except perhaps
    putting the field on a separate layout. You can then use the Freeze
    Window script step before going to the layout to copy the fields
    content, then go back to the original layout. This way the user doesn't
    see the layout change and the copy process.

    You can also put a Go To Field script step at the end of the script to
    go to any other field, or simply use the Exit Record script step so
    that the cursor isn't left in any field at all.



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

  4. #4

    Default Re: Insert TAB into calculated field


    Hi,

    You can also insert a tab directly into the calculation box by
    (on Windows) [CTRL] [Tab]. Sorry, I'm not sure on Macs - maybe
    Option - Tab?

    LaRetta

    --
    Posted via [url]http://dbforums.com[/url]
    LaRetta Guest

Similar Threads

  1. Making a calculated field...
    By Odvesims in forum MySQL
    Replies: 0
    Last Post: April 11th, 03:06 PM
  2. Lost style in calculated field
    By Carlo in forum FileMaker
    Replies: 4
    Last Post: September 28th, 09:00 PM
  3. Creating a calculated field with quotes
    By Rich Sagall in forum FileMaker
    Replies: 8
    Last Post: September 28th, 02:25 PM
  4. Calculated Field in a Form
    By Clifford S. Morton in forum Microsoft Access
    Replies: 1
    Last Post: July 18th, 10:12 PM
  5. Another calculated field question.
    By Microsoft in forum Microsoft Access
    Replies: 1
    Last Post: July 12th, 11:09 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