nonzerocomm Posted February 21, 2002 Posted February 21, 2002 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?
Garry Claridge Posted February 21, 2002 Posted February 21, 2002 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
nonzerocomm Posted February 21, 2002 Author Posted February 21, 2002 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 :-)
Garry Claridge Posted February 22, 2002 Posted February 22, 2002 Francois, Ah, I see what you are doing; very nice. Only a guess here, maybe try it like an Intratag: {FindFieldItem} Good Luck. Garry
nonzerocomm Posted February 24, 2002 Author Posted February 24, 2002 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.
Recommended Posts
This topic is 8377 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 accountSign in
Already have an account? Sign in here.
Sign In Now