Jump to content

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

Recommended Posts

Posted

On one webpage I have multiple inlineactions that get data out of the same database. In the database I have a calculation field: status(currentrecordnumber)-1 this calculation only works with one inlineaction and that is the inlineaction with -findall.

Is it possible to solve this? Or is it a bug and will filemaker fix this?

Posted

Hi, I have a number of pages where I'm using multiple inlines referencing calculated fields and they work OK.

One particular page is an events calendar with four inlines that find on fields like 'this_week' and 'now' - calculations that use the dreaded 'today' function, so they're not even stored and indexed!

I think there must be a glitch with either your CDML or the database - can you post some more details?

regards, Jeff

Posted

this site is not really working 100% but you can see that the calculation is not working

http://62.108.6.218:591/eboomberg/

there you see 0 1, 1 2, 2 3 (calculation and currentrecordnumber)

when you type something like "boomberg" in the search form and hit the search button you will see that the calculation is not correct.

Posted

with findall everything works oke (also with different sortorders and same databases) but when I use -find instead of -findall the calculations stop working.

Posted

I re-tried to do the search not in an inline action and I got the same results as before... all the calculation fields (also in all the inlineactions) are -1... that means he sees status(currentrecordnumber)=0

but whyyy?:P First the bug with languages in 5.5 now this.

  • Newbies
Posted

Hi,

once I had a problem of the same kind.. not exactly like this.. but a -find Operation and a -sort Operation (don't know exactly, but something like this..

the solution was.. switch back to FileMaker5.0.. and everything was OK

hmm.. may you try this out..

b.

Posted

"...when you type something like "boomberg" in the search form and hit the search

button you will see that the calculation is not correct."

Well, since I don't know what it is that should be returned, I really could not "see that the calculation is not correct" when I typed in "boomberg".

Then, to see if I could generate an error, I typed in "China". This returned a message that search_results.html could not be found.

Perhaps if you posted the code for your form action...

Posted

it is not the form it is the calculation field that is returned

when you search for example "boomberg"

you get:

Boombergse wadi's -1 1

eik mag blijven leven -1 2

kunstenaars en atelierdagen -1 3

20 huizen te koop (17 juni 2002) -1 4

this should be (this is also what I get when I remove the inlineactions):P

Boombergse wadi's 0 1

eik mag blijven leven 1 2

kunstenaars en atelierdagen 2 3

20 huizen te koop (17 juni 2002) 3 4

and believe me I checked more than twice a lot of stuff frown.gif

Posted

According to the page returned (View Source), you may be getting "Boombergse wadi's -1 1" because the code on the page reads "<td>Boombergse wadi's -1 1</td>".

You speak of inlineactions. I don't see them in your code (View Source). Nor do I see anything which would cause the display of a field.

Posted

You originally said that the calculation field displayed correctly only when called with a -findall tag.

I see this code:

[FMP-Record] <tr bgcolor="[FMP-Field: rijkleur]"><td align="center" width="100">[FMP-Field: datum]</td><td>[FMP-Field: titel] [FMP-Field: overslaan] [FMP-CurrentRecordNumber]</td><td width="1">[FMP-Field: onderwerp]</td></tr> [/FMP-Record]

and it returns

20-05-2002 Boombergse wadi's -1 1 Verkeer

I gather that the calc field is "overslaan".

Since the -1 is in error, what action tag was used? I've been experimenting a bit.

Posted

Sharky, I realize that you must sleep, so I decided to experiment with a -find tag.

Here is what I did. FMPro 5.0.v3

I have a db with about 30,000 records of thoroughbred pedigrees. Each record has over a hundred fields. Amongst the fields are "dam", "dam sire", "foundrecs", "recs", and "calc".

"dam" is a text field containing names. (indexed)

"dam sire" is a text field containing names. (indexed)

"foundrecs" is an unstored calculation = status(currentfoundcount)

"recs" is an unstored calculation = status(currentrecordcount)

"calc" is an unstored calculation = status(currentrecordnumber)

So when I perform a db find on a dam sire such as Danzig

"foundrecs" displays on the layout "90"

"recs" displays on the layout "28573"

"calc" displays on the layout "1" (for the first found record, "2" for the 2nd f.r., etc)

I then created another unstored calculation = "calc-1" which I called "shark"

"shark" displayes on the layout "0" (for the first f.r., "1" for the 2nd f.r., etc.)

I also have some format files, 'cause I like to play with this stuff. I altered one file to perform a -find on "dam sire". I altered another file to display the fields "dam" "dam sire", "calc", "shark" and the cdml tag [fmp-currentrecordnumber]

So I then ran this on a fake LAN through Netscape. I did a find on Danzig.

The first two records returned (out of 90)

(display in the order):P

"dam" | "dam sire" | "calc" | "shark" | [fmp-currentrecordnumber]:

Danzig's Dandy | Danzig | 451 | 450 | 1

Frozen Francine | Danzig | 1115 | 1114 | 2

______________

______________

Status (CurrentRecordNumber)

Returns the number of the current record in the current found set. This value is determined by the relative place of the record in the found set, and changes depending on the find criteria and the sort order.

Copyright

Posted

Avoid the calc fields and use CDML codes:

[FMP-CurrentRecordNumber]

[FMP-CurrentRecordCount]

[FMP-CurrentFoundCount]

Posted

I will look at Keith's post after this reply smile.gif

but I need "currentrecordnumber minus one" and that has to be done with a calculation field

Posted

yes, but with inline actions i get status(currentrecordnumber)=0 for all records

when I remove the inline actions everything works.

I get a similair thing as you had when I put the search in an inline action though...

I am thinking of a way but I believe it is impossible with this bug

Posted

Can't you use Vaughans' tags suggestion and assign the values to JavaScript variables and do the math on the fly between record tags thus removing the need to reference a calc field??

You don't want to go back to WC 5.0v6 as it is inferior in it's ability to handle large amounts of data.

smile.gifsmile.gifcool.gif

Posted

Hey Sharky,

I have tried my fields with an inlineaction (-find) and get results similar to the -find action I described previously.

Since the number (e.g.451) is for the related record in the mode of "all records", that should be usable for linking to that record, for instance. True the numbers may display as 451 | 450 | 1 , but is it important that these numbers be displayed to the client? If the display of the numbers is not important, but the ability to use those numbers internally for a link or some other purpose remains intact, then it is just a matter of design and style to allow the usage.

You might consider using status(currentrecordid) for internal use.

I don't know what exactly it is you are trying to accomplish in terms of design.

Posted

Sharky, I don't know what you are trying to design.

I decided I should use a different database, so I am using one that is the pedigree of about 5000 thoroughbred sires. Using the same basic calculation fields and searching on sires instead of dams, I tried a find and an inlineaction, the display code of which is:

<p>

[fmp-record] [fmp-field: sire 00] by: [fmp-field: sire 01] out of: [fmp-field: mare 01]. <br>Found rec. #:P [fmp-field: calc] less 1: [fmp-field: shark] <br>and this is Current record number: [FMP-CurrentRecordNumber] of found set of [fmp-field: fndrecs]<br>

[/fmp-record]

<hr>

<p>

[fmp-inlineaction:-db=sire,-lay=sires,sire 01=Damascus,-find][fmp-record][fmp-field: sire 00] by [fmp-field: sire 01] out of: [fmp-field: mare 01]. <br>Found rec. #: [fmp-field: calc] less 1: [fmp-field: shark]<br>and this is Current record number: [FMP-CurrentRecordNumber] of found set of [fmp-field: fndrecs]<br>

[/fmp-record]

[/fmp-inlineaction]

and which displays as results:

Relaunch by: In Reality out of: Foggy Note - '65.

Found rec. #B) 20 less 1: 19

and this is Current record number: 1 of found set of 2

Relaunch A Tune by: Relaunch out of: Don's Music.

Found rec. #B) 692 less 1: 691

and this is Current record number: 2 of found set of 2

____________

Soy Numero Uno by Damascus out of: Tasma - '57.

Found rec. #: 16 less 1: 15

and this is Current record number: 1 of found set of 52

Time For A Change by Damascus out of: Resolver .

Found rec. #: 91 less 1: 90

and this is Current record number: 2 of found set of 52

Private Account by Damascus out of: Numbered Account - '69.

Found rec. #: 98 less 1: 97

and this is Current record number: 3 of found set of 52

Bligh by Damascus out of: Maimiti - '77.

Found rec. #: 125 less 1: 124

and this is Current record number: 4 of found set of 52

Highland Blade by Damascus out of: Misty Bryn - '69.

Found rec. #: 141 less 1: 140

and this is Current record number: 5 of found set of 52

...

etc.

I hope you find this useful.

This topic is 8253 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.