
djgogi
Members-
Posts
583 -
Joined
-
Last visited
Everything posted by djgogi
-
Hi Ray, yes I was not so clear in my post and I have commited few errors: 1) I should have said that case is faster than nested if else structure. 2)I gave missleading name to example file> It is not comparision between nested If-else structure and case structure 3)The example I gave is not the proof of what I was trying to say Any way, what I was saying is that all terms in case structure are evaluated and than the right result is returned. Now, the explanation for the fact that case structure is faster than nested if statement is in the difference on how data are returned from the function. Nested ifs have an single return point while case function has multi return points. Basicaly the case function could be interpreted in this manner: If (condition1=true) return res1 end if If (condition2=true) return res2 end if ... .. If (conditionN=true) return resN end if If return res0 In fact, as Tom stated, this is the optimized way to use Ifs in place of (missing) case statement in scripts. As you have noticed the table of dependencies has done it
-
All cases are allways tested . Check the sample file above. It has two layouts, one there is a test field, on the otherone not but the test is triggered via script Dj CaseVsIfExample.zip
-
It is 12000 in first case and 2000 in second PS I have ******* slow conection in this moment
-
12000 2000 Dj
-
What was to the original question? Dj
-
Well there is no need for carriege returns. Simply put space between different request and you get: AND serch in field Dj
-
Hehe, this time Christian was faster. Dj
-
Having text field alfa Rec1>alfa=2B 3C 2 2A Rec1>alfa=2 3A 2 2A for ex. Than performing find with =2B will give only rec1 The solution1 is the same thing Be aware that == with find, means exact whole string and not exact word in string Dj
-
Having text field alfa Rec1>alfa=2B 3C 2 2A Rec1>alfa=2 3A 2 2A for ex. Than performing find with =2B will give only rec1 The solution1 is the same thing Dj
-
Hi Ugo, problems with cookies I think. Do you see me now? Dj
-
I have posted at fmfiles some time ago this file ftp://ftp.fmfiles.com/download/devhaven/tipstricks/text/FormatLetter.fp5.sit It is a scripted solution, however. Dj
-
Hi, cjaeger. We have chosen the same numbers for example. Just to add something else. You couldalso mix criteria inside field like =5 56 =123 dj
-
Yes, there is. You can insert search string in field cKey like this: =2 =21 and hit find The above would find every record, if any, having 2 21 in field cKey Dj
-
To find non empty values in TEXT field use following Set error Capture [on] Freeze Window Enter Find Mode[] SetField [field1, "="] New Record Request SetField [field2, "="] ... ... Perform Find If [status(CurrentFoundCount)] Show omtted Perform Script [Your Script For Clearing Fields] else //Handle no records found end if Dj
-
Yes you're right . It was leading "f" in if(field_to_be_watched;Status(CurrentDate);fStatus(CurrentDate)) that made me think he was using some other field for false statement, even it was obviously an status function. Sorry, my error Dj
-
"Fixed "Relational Design vs Business evolution
djgogi replied to Ugo DI LUCA's topic in Relational Database Theory
Now looking at example you have provided I think that structure Company----<Subsidiaries (1-many rel based on companyID) is the starting point. Dj -
"Fixed "Relational Design vs Business evolution
djgogi replied to Ugo DI LUCA's topic in Relational Database Theory
For simple multi attributes I would (I'm using) use repeated fields. The method is intended for real attributes that are proper only for certain records Dj -
"Fixed "Relational Design vs Business evolution
djgogi replied to Ugo DI LUCA's topic in Relational Database Theory
Hi again Ugo, let's take example of an Personnel table which list all employees of some imaginary company. Among them you -
yes of course, the Delete All Records script step will delete all records in Current Found Set So... after performing find and testing that the found set is existing simply call Delete All records step Dj
-
The problem with this implementation is that condition in if statement could easily evaluate to false even if field_to_be_watched has been changed. For ex if it is numeric field than changing it to 0 would not trigger the update, also if it is the text field than changing it to something starting with chars 'n' or 'f' would produce the same result. Instead you'll need to implement more robust version of the same principle dateField=case(IsValid(field_to_be_watched);Status(CurrentDate);getField("dateField")) In this case dateField must be storable (you don't have to turn storing on, however) otherwise (if ield_to_be_watched is an unstorable field :global, related or unstorable calculation; FM will CRASH. Dj
-
"Fixed "Relational Design vs Business evolution
djgogi replied to Ugo DI LUCA's topic in Relational Database Theory
Hi Ugo, well, neither do I was talking about constant rels in a). As for what stated in : it's the same principle under different circumstances. I've mentioned Ray (cobaltsky), because of his excelent explanation of this principle (and other extentions of it) in this article Dj -
Previous entry result to be calculated
djgogi replied to corey's topic in Calculation Engine (Define Fields)
Look at the attachement for the implementation in case of consecutive months. If you need to handle also situations when some months are missing you'll need to parse relational value list for last two entries Dj Corey.fp5.zip -
"Fixed "Relational Design vs Business evolution
djgogi replied to Ugo DI LUCA's topic in Relational Database Theory
I'm not aware of any DBMS with embeded "many-to-many" relationship management. (I don't think there is such system). Sometimes you just have to use it: a)Let's say you need to create an DB where some of records need to have some extra informations. The most flexible solution is to create an other table containing extra coulumns (fields) with 1-1 rel based on recID. Of course you could add those extra fields to your original table and use flags to handle navigation, data insertion ect.( and you'll need to do it each time you'll need to make some "minor" changes to record trace) or b)Your table consists of very large number of columns and the file size is growing dangerousely. Solution :split the records in more tables with 1-1 rel based on recID, each having only subset of columns (fields) from original table, or as Ray would say do "vertical separation (Vsep)" Dj -
How do you stop a "Carriage return"?
djgogi replied to wingwalker's topic in FileMaker Legacy fp3 and fp5
Take a look at my recent post one line field in sample section of the forum Dj -
This procedure avoid problems when changing IP address of server hosting FM files 1)MacOs X Open NetInfo Manager (applications-->utilities) Select "machines" Click on new and edit name of new folder to for ex. FmServer double click on property name to edit it to "ip_address" (without quotes) set the ip_address value to IP number of the host you are using. Click on new (or select from menu "Directory" New property" Set the property to "name" and it value to FmServer. Now edit the FileMaker Hosts file (located in preferences-->Filemaker preferences) and add line FmServer (if you don't need any other host you could delete them). 2)MacOS Classic Create an text file Hosts and drop it into system folder edit the file Hosts yourserver.yourdomain.com A <insert here the IP address> FMServer (or whatever name you would like to use) CNAME yourserver.yourdomain.com Edit the File Maker Host file as in OS X example Finally open TCP/IP control pannel Set user level to advanced or higher The new button "Specify host file" would appear Select the hosts file you've created 3)Windows For windows system the procedure is almost the same: locate the file hosts (windows/system32/drivers/etc/ on XP for other systems I'm not sure) add the following line [insert the real IP address of your host] FmServer of course the above line should be inserted without brackets Edit FMHosts.txt as in above Dj