Jump to content

FMP-If and FindFieldItem

This topic is 8072 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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)



=== 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...

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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



To perform the find I would write:


&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





<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>




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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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].


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This topic is 8072 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

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