Wednesday, November 18, 2009

A READER ASKS: Button To Make Selected Text UPPERCASE

From Dwayne Wright - Certified FileMaker 10 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

1x - Calculations In Use

A READER ASKS
I enjoy your columns.  I need to format into capital letters a lot, and for years I've tried, unsuccessfully, to create a button so I could turn any word or sentence (not the entire field) into UPPERCASE, without scrolling up to the Format/Style/UPPERCASE menu.

Any ideas?  I use FileMaker Pro Advanced v.8 for the Mac. If there is no button available, do you know if v.9 or 10 have this feature?

-------
DWAYNE RESPONDS
I don’t know of a way to do this purely with FileMaker “out of the box” resources. I could have spent some time investigating this but I cruised over to the custom function library on briandunning.com to see if there was a custom function that would do the trick.

I didn’t see one of them but I did see three of them that would work. Thinking about it now, I guess I could have tried experimenting consolidating the code of all three into one but I’ll leave that experiment up to you.

getActiveSelection - http://www.briandunning.com/cf/595
Returns selection in a text field.

RightofSelection - http://www.briandunning.com/cf/1049
Gets the string to the right of the active selection text. If there is no selection, returns nothing

LeftofSelection - http://www.briandunning.com/cf/1048
Gets the string to the left of the active selection text. If there is no selection, returns nothing

Using these three custom functions, I set a field equal to itself with the following calculation ...

LeftofSelection & Upper(getActiveSelection) & RightofSelection


There is a related movie on this topic! CLICK HERE!


=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

Saturday, November 14, 2009

There are three FileMaker text functions that have case sensitive attributes and one of them is?

a) PatternCount

b) Filter

c) Quote

d) Replace

=====================
TO SEE THE ANSWER TO THIS QUIZ QUESTION
(CLICK HERE)
=====================

For a more challenging quiz environment, check out our interactive FileMaker quiz product at http://www.dwaynewright.com/inbiz/quiz/index.html


More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

Friday, October 23, 2009

A negative number in a FileMaker position function occurrence parameter will go backwards.

a) True

b) False

=====================
TO SEE THE ANSWER TO THIS QUIZ QUESTION
(CLICK HERE)
=====================

For a more challenging quiz environment, check out our interactive FileMaker quiz product at http://www.dwaynewright.com/inbiz/quiz/index.html


More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

Wednesday, October 07, 2009

A READER ASKS: Aggregate Function Examples

From Dwayne Wright - Certified FileMaker 10 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright



A READER ASKS
I need one sample file for this example http://dwaynewright.blogspot.com/2007/08/filemaker-sum-function.html


I am having 3 columns

1. Date
2. Receipt no
3. Amount

I put these in one portal field (portal field is having 20 lines) and i need the 20 lines amount total.

Please give an example file, so that I can easily understand

-------
DWAYNE RESPONDS
I did an example file for this quite some time ago that has a number of interactive examples of how to use the Text / Number / Date / Time / Aggregate Functions.

An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles08/Function3.zip

If you want me to build a custom example file for you, I'd need to charge for a 30 minute technical support session. Having to keep bread in the bread box and all that. I do create custom example files to help clients over hurdles all the time.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

A READER ASKS: Random Return Values Without Repeats

From Dwayne Wright - Certified FileMaker 10 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright

APPENDIX 1: A Reader Asks

A READER ASKS
Is there a way to be sure the random number generated won't repeat over a set of, say, 3,000 calculations? Right now I have it set to seven digits, but is there a way to be 100% certain there will be no repeats?

-------
DWAYNE RESPONDS
I did a quick search on briandunning.com for a custom function that might do the trick because you would need some sort of recursion. Custom functions are the only way to have a calculation loop, unless you are setting the value with a script. I did find one that looks quite promising and I hope you are using FileMaker Advanced (necessary to add your own custom functions to your FileMaker files).

The custom function is NoRepDigit and was posted by Daniele Raybaudi, ACI (www.aci.it) and here is the direct link to the post ...

http://www.briandunning.com/cf/454
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

ADVERTISEMENT ==================
Help support this blog by considering a donating to its ongoing growth. For more details, please visit http://www.dwaynewright.com/donate.html

Saturday, October 03, 2009

FILEMAKER: Let Function Used For Setting Multiple Global Variables

From Dwayne Wright - Certified FileMaker 10 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright

CHAPTER 17: Logical Functions

I’m late to the party on this one, perhaps you are as well. The idea is centers around using the Let function to set global variables for a script. I had a case to use such a technique today and thought I’d take a moment to share.

In my situation, I’m building a database that will be replacing one very long Excel spreadsheet. The spreadsheet has a collection of filter fields to trim down the shown rows. I built an interface within FileMaker to mimic that display and used script triggers on global fields to mimic the Excel filtering actions.

Now this spreadsheet the client is using is freaking long and each user has to scroll quite a bit to click into the field that sets the filter about where it appears in the portal row. As a linked side note, I’m creating multiple interface views of this wide list. This allows us to have dedicated purpose views of a wide range of data. As I started to work on this, I got the immediate impression that there must be a better way. That better way is using a technique where the filter options come up in a new window. Once a filter is chosen, the dialog box window performs the search, closes the previous window and adopts the properties of the main window when the search was instituted.

In order to properly adopt the properties of the first window, I’m capturing them with a series of global variables. I could capture the data with a series of Set Variable script steps but I implement just one of those by leveraging the power of the Let function.

Let([
$$PreviousLayout = Get ( LayoutName );
$$PreviousLineWindow = Get ( WindowName );
$$WindowHeight = Get ( WindowHeight );
$$WindowLeft = Get ( WindowLeft );
$$WindowTop = Get ( WindowTop );
$$WindowWidth = Get ( WindowWidth )
];
1+1)

This calculation will set the above variables and then I can use those variables to reposition the new window. The power is the declaration of the variables. You can see that my final calculation in the Let function is a simple 1+1. I’m not using the Let function for its generally intended purpose, I’m just using it as a mechanism to declare global variables. This isn’t anything new, it has been around for a while. I just wanted to add my voice to the song of this technique and how I first ended up using it.

Here are a couple screen shots.



=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2009 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.



Stretch your FileMaker knowledge muscles daily with InBizness Quiz - FileMaker Edition! For more information, click here!