Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FMP-If and FindFieldItem

Featured Replies

Using FMP 5.5v2 and Web Companion 5.5v3

How can I manipulate FindFieldItem with FMP-If?

I really want to catch, chop, reorder and manipulate otherwise the field name and values from the find request.

Let's say a user wants to find a decently paid job in Canada (Yep, the great white north)

&-op=eq&country=Canada

&-op=gt&Salary=50000

=== REM ===

Couldn't use [FMP-If: FindFieldItem .eq. Something]

Couldn't use [FMP-If: Something .eq. {FindFieldItem}]

Couldn't use [FMP-FieldName] because FMP uses the same layout for finding and returning field values so too many fields apear in the pop-up menu.

Couldn't use [FMP-ValueList: FindFieldItem] because it expects a field name, not a tag.

I'd like to avoid mono-threaded scripts, reserve tokens for special purposes, no cookies please.

(I know this is a CDML question but two posts in the CDML conference did not yield a "can't be done" answer or proven working twist.)

Unless i'm mistaken that is...

Bonjour Francios,

Comme ca, peut etre.

You wrote: Couldn't use [FMP-If: Something .eq. {FindFieldItem}]

How about....

Couldn't use [FMP-If: Something .eq. {FMP-FindFieldItem}]

From a distant cousin (Frigon & baribeau)

  • Author

Salut cousin!

I can see that the french language is still alive in the strip going from Montr

Keith, learn CSS, you'll master that in 1-2 days and you will love it!

To use Font=something produces large code, it was just temporary solution and future is just with CSS

Manageable, small, easy to change font site-wide.

Thanks Anatoli. I've read a bit about it and have tried it some. But I need more time with it and I keep putting it off.

fwiw I would start from a slightly different point of view.

"&-op=eq&country=Canada

&-op=gt&Salary=50000"

To perform the find I would write:

&country===&country=Canada

&salary=>&salary=50000 (or &salary==>&salary=50000 for equal to or greater than 50000)[and if it was in a form action I would add quotes]

On the returned format file I might use something like

[fmp-if: currenterror .eq. 401]

No Jobs available. Here is some code to a button to allow you to search for a different job

[fmp-else]

<p><center>

<table>

[fmp-record]

<tr><td><font face="sans_serif" color="#0000ff" size="+0">[fmp-field: a]</font></td>

<td><font face="sans_serif" color="#0000ff" size="+0">[fmp-field: b]</font></td>

<td><font face="sans_serif" color="#0000ff" size="+0">[fmp-field: c]</font></td></tr>

[/fmp-record]

</table></center></p>

[/fmp-if]

I hope you find this useful. The first one is free.

Do not hesitate to ask me. I am lazy source coder and I am using Adobe GoLive for most of the HTML tasks. But I do understand the topic well. Not everything of course, but sufficient part.

I've started with CSS 3 years ago and I never regret it.

Maybe we can do new small topic -- or just start with new question in some of the web part where I can show fellow FileMakerers a bit of CSS. That way I can contribute e.g. 1-2 small parts/questions a day and create mini manual for CSS.

These days I am more involved with HTML than FM and CDML so it will be not far from my everyday workflow.

  • Author

Thanks for the lovely CSS code and I wish you'll get your CSS forum but we"ve go far away form the initial question.

Let me rephrase the "FMP-If and FindFieldItem" thing in a better presentation. When you ask the URL www.fmforums.com/cgi-bin/ultimatebb.cgi?ubb=forum;f=22;hardset=;start_point=;DaysPrune=, you get to the FMForums >> Internet>> CDML section and see the threads. On the right side of the FMForums Logo is a pop-up menu that says "Show topics form last 20 days". If you change it to "Show topics form last 5 days" and press the "Go" button, then, on the returned page, that pop-up menu is now on the on the "Show topics form last 5 days". Ultimatebb remembered and kept it positioned.

* I want to do the same with the find field items, operators and values. *

In order to get there, I posted 4 new topics in two FMForums conferences with pseudo-code, real code, explanations and examples with how we can do the "Find again in pop-pu menus"

So the question remains, within [FMP-CurrentFind]....[/FMP-CurrentFind], how can I catch, chop, reorder and manipulate otherwise the field name and values from the find request if there is no way to code [FMP-IF: [FMP-findfieldItem] .eq. country]Do this[FMP-Else]Do that[/FMP-IF].

Frank.

  • Author

Hello again Garry,

I guess now that doing the "find again in pop-up menu form" may only be feasable in something else than CDML. Javascript may be the best first alternative.

Thanks for the advice and piece of code. It answered my next logical question: Can CDML and JavaScript be interleaved.

I will get a hold of a decent JavaScript guide because when I look at my problem, arrays appear to be the solution.

Also, I've seen a topic in FMForum with a JavaScript containing arrays.

Thanks to you, Keith, Anatoli an Dr. J.

It's half past midnight, so excuse' moi if this idea is patently stupid....

In the code for the pull down menu why don't you try a series of statements like...

[fmp-if: {fmp-findfielditem} .eq. Canada]Selected[/fmp-if]

If you do that for each of your options, the selected item will be the one that appears in the unpopped pop-up, n'est ce pas?

You may need to look at some Javascript for this; e.g.???

code:


<script>

[FMP-CurrentFind]

If ("[FMP-FindFieldItem]" == "country")

{ bingo ; }

[/FMP-CurrentFind]

</script>

Hope this is helpful. All the best.

Garry

[ March 18, 2002, 12:06 PM: Message edited by: Garry Claridge ]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.