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

parsing findfielditems, sort Item?

Featured Replies

I'm using FMP55 on MacOS, how can I parse find field items after a find?

I would like to do somethig like this

[FMP-CurrentFind] [FMP-if: FindfieldItem .eq. SomeTextValue]do this[FMP-Else]do that[/FMP-If][/FMP-CurrentFind].

I could'nt find how to parse sort items either.

Is there a findfieldItem.1 trick like for tokens or related fields maybe?

Is this what you are looking for:

[FMP-Record]

[FMP-if: field:myfield .eq. SomeTextValue]

do this

[FMP-Else]

do that

[/FMP-If]

[/FMP-Record]

All the best.

Garry

  • Author

Hello Garry,

Your reply is correct for getting fields from the database's found set after a find request and I do use [FMP-Record] further down the returned format page but I really meant being able to "grab" the field names from the find request which appears to be only accessible by [FMP-CurrentFind], [FMP-FindFieldItem] and [FMP-FindOpItem] tags unless there are non-scripted alternatives.

I should have called the topic "Search and Sort Again form". Hyperlinks have limited character lenght so I use forms and pull down menus to save screen space.

I want to code the Search n Sort Again forms before (or after) all the [FMP-Record]..[/FMP-Record] in the returned format page from a find request so user can *play* with their request. Using [FMP-CurrentFind] inside [FMP-Record] is another topic for the moment.

1-The Request

Let's suppose this request in its broken hyperlink form for clarity:

http://www.estrois.com/en/FMPro?-db=jobs.fp5

&-lop=and&-lay=JobsListLayout&-format=JobListFormat.html

&-op=eq&Country=Canada&-op=gt&Salary=50000

&-sortfield=PostingDate&-sortorder=descend&-sortfield=Salary&-sortorder=descend

&-max=10&-skip=20&-Find

2- The Reply:

On the top ( or at the end) of returned format page JobListFormat.html, I place a "Search n Sort Again" form before (or after) any [FMP-Record] stuff.

I can reuse the -Max and -skip (for example) by coding:

<SELECT NAME="-skip">

<OPTION VALUE="[FMP-Currentskip]" SELECTED>Skip [FMP-Currentskip]

<OPTION VALUE="5">0

<OPTION VALUE="5">5

<OPTION VALUE="10">10

<OPTION VALUE="25">25

</SELECT>

</TD><TD>

<SELECT NAME="-max">

<OPTION VALUE="5"[FMP-If: CurrentMax .eq. 5] SELECTED[/FMP-If] >5

<OPTION VALUE="10"[FMP-If: CurrentMax .eq. 10] SELECTED[/FMP-If]>10

<OPTION VALUE="25"[FMP-If: CurrentMax .eq. 25] SELECTED[/FMP-If]>25

</SELECT>

But I can't get [FMP-FindFieldItem] in an FMP-If statement as far as I know.

Francois who still likes FMP :-)

Francois,

Ah, I see what you are doing; very nice. Only a guess here, maybe try it like an Intratag:

{FindFieldItem}

Good Luck.

Garry

  • Author

Hello again Garry,

Using Intratags didn't do the trick for me yet.

Before trying more alternatives, I searched all FMForums and on the web to find that Intratags go only on the right side of and FMP-If and are better served in FMP-Inline but I still can't cumulate FindFieldItems in CDML to play with.

I Have read many replies in FMForums and I think FindFieldItems should be parsed in JavaScript variables and represented in HTML.

I haven't seen a website that reuses all the requests' variable yet so i'll keep working in that direction.

Thanks.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.