January 4, 201115 yr Hi, let's say that I've two fields. Field 1 contains "Hi, my name is john and I'm learning filemaker" I want to be able to tell Field 2 to display Field 1, but Erase after a certain value. Example, I tell it to erase from the word "my". Which will contribute that the Field 2 only displays "Hi," from field 1.
January 4, 201115 yr Author One way should be using leftwords, but I can't manage to make it work. I'm trying to use trim to display everything after my.
January 4, 201115 yr display Field 1, but Erase after a certain value. Your question is not clear enough: how do you determine which word is the "certain value"? If it's always the second word, then = LeftWords ( Field 1 ; 2 ) should do. Make Field 2 a Calculation field, with the result type set to Text.
January 4, 201115 yr Author Your question is not clear enough: how do you determine which word is the "certain value"? If it's always the second word, then = LeftWords ( Field 1 ; 2 ) should do. Make Field 2 a Calculation field, with the result type set to Text. I'll Import form to filemaker. Every form includes. eg. "Address", so I know that Adress Is present. But I don't know if it's the 15th or 16th value since a customer can have double aftername etc. So, I want to tell filemaker to delete everything starting from address, in every post.
January 4, 201115 yr Every form includes. eg. "Address" Can you provide an example or two of the imported data? Is it all imported into one field? Is the address (or at least the word "Address") always present? Are there any separators between the form fields, e.g. carriage returns? Edited January 4, 201115 yr by comment
January 4, 201115 yr Author Can you provide an example or two of the imported data? Is it all imported into one field? Is the address (or at least the word "Address") always present? Are there any separators between the form fields, e.g. carriage returns? I want to import email-forms to filemaker. So step one is import the mail to one field: "Förnamn * Test Efternamn * Testson Adress * östergatan 36c Postnummer * 25269 Ort * råå Mobiltelefon 0760491556 Epost * [email protected] Antal guldpåsar 1 " But I want the entered data by the customer (ex name,address) in a seperated fields. So I've created a new filed with: Let ( L = Length ( plainmail ) ; Trim ( Right ( plainmail ; L - Position ( plainmail ; "*"; Förnamn ; 1 ) ) ) ) This displays everything but the first word (Förnamn *): "Test Efternamn * Testson Adress * östergatan 36c Postnummer * 25269 Ort * råå Mobiltelefon 0760491556 Epost * [email protected] Antal guldpåsar 1 " So what I want to do is to trim from the other direction so that only Test is displayed. The underlined text is always present it all forms, they are the title of the field the fill in our website.
January 4, 201115 yr If it can be assumed that there are no carriage returns within the response, you could use = Let ( [ prefix = "Adress" ; i = ValueCount ( Left ( ImportedData ; Position ( ¶ & ImportedData & ¶ ; ¶ & prefix & " *¶" ; 1 ; 1 ) ) ) ] ; GetValue ( ImportedData ; i + 1 ) ) to extract the address, for example. See also: http://fmforums.com/forum/showpost.php?post/289685/
January 4, 201115 yr Author If it can be assumed that there are no carriage returns within the response, you could use = Let ( [ prefix = "Adress" ; i = ValueCount ( Left ( ImportedData ; Position ( ¶ & ImportedData & ¶ ; ¶ & prefix & " *¶" ; 1 ; 1 ) ) ) ] ; GetValue ( ImportedData ; i + 1 ) ) to extract the address, for example. See also: http://fmforums.com/forum/showpost.php?post/289685/ Wow, that worked very well. I only get a slight problem. I have a value without a "*", I try to edit your formula so that it doesn't require the * but no success. What should I remove? Thanks again for your help.
January 4, 201115 yr I have a value without a "*" Try specifying the entire prefix (including the " *" if there is one) in the prefix variable: Let ( [ prefix = "Adress *" ; i = ValueCount ( Left ( ImportedData ; Position ( ¶ & ImportedData & ¶ ; ¶ & prefix & ¶ ; 1 ; 1 ) ) ) ] ; GetValue ( ImportedData ; i + 1 ) )
Create an account or sign in to comment