Jump to content

philipcaplan

Members
  • Content Count

    119
  • Joined

  • Last visited

Community Reputation

-2 Poor

About philipcaplan

  • Rank
    member

Profile Information

  • Gender
    Male
  • Location
    London, England

FileMaker Experience

  • Skill Level
    Intermediate
  • FM Application
    16 Client

Platform Environment

  • OS Platform
    Mac
  • OS Version
    MacOS X 10.13.3

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you comment - I understand and agree with what you are saying. This **is** "an initial password", but you are correct that if my site is successful, I will need to have it programmed so that all passwords are stored as for example a hash of password/username-or-email. I do understand that. I have done a fair amount of reading on this matter. In fact, it is now such a well known technique, that I am amazed that there are still any databases of plaintext-passwords floating around in the world!
  2. Hi Fitch. Sorry if I offended you. Bad choice of word. Please accept my apology. Thank you comment. The latest one seems to do the job I need, and as you say it is simple (as per Occam's Razor, I think). True randomness is not essential. I am using these calcs to generate a password to give to users of a website I am trying to create, with a format of word99word (ie, 2 "random" words separated by a 2digit number). What I am seeking is "close to uniqueness". With 2000 words the chances of the same password being generated twice I calculate at 1:256million - good enough I think. This is similar to the password that AOL gave me about 20 years ago, which I can still remember!! So many passwords since then!!! If I start getting users, I can pay a freelance programmer to reproduce the technique **plus** a check that the generated pword is not already in use, as well as other parts of the "signup" process which I am currently prototyping by pasting the results of an online hosted form into my FMPro database to extract name, email, etc, and then email them confirmation with the password to use. Thanks once again for all your help.
  3. Fitch is correct. I wanted the random number to never contain the digits "0" or "1" because when they are displayed to a user of my website, they can (depending on the font used and other factors) be confused with the letters o or O or l or I (the last two were "l' as in lemon, and "I" as in India, thereby proving my point of wanting to avoid possible confusion!!). I tried using his formula above [from Let( to result)] and it seemed to work OK. I then tried the following (which was in an email sent from this thread to me in Fitch's name, although I don't see it on the site!!): Filter ( GetAsNumber ( Int ( Random * 10 ) & Int ( Random * 10 ) ) ; "23456789" ) and while it also seemed to work, after producing a number of good results (such as 23, 67, 94, etc) it then gave a blank result!! Presumably both random numbers generated on that occasion resulted in 01 or 10 or 11 -- and so the entire result was "filtered" out!! So, I am using the Let(...result) formula -- although it will probably be far more difficult for (porr little me) if I need to come back and try to understand it in the future!!! In fact, looking at it now, it looks as though it currently only generates numbers up to 29, and I would have to type into it all the other possible numbers to get up to 99. Fitch chickened out of doing that!!! And, since I now feel that 2 digits looks better (more regular) on my site than just one digit, perhaps what I really want is a number between 22 and 99 (excluding any that include "zero" or "one"). Of course, I can put all the numbers into the Let...result) formula to achieve that. Or is there a version of the "Filter" formula that would work to always guarantee two digits as a result (with no 0's or 1's)?
  4. Thank you, comment. That worked perfectly!! Now, I'll be grateful if can you also help me with the following: to create a random number from 1 to 99 but excluding "zero" and "1" (ie, only using 2,3,4,5,6,7,8,9). Many thanks. Philip
  5. I have two files called "signup.fmp12" and "2000-words.fmp12". I am using FMPro16 on MacOSX 10.13.3. "2000-words.fmp12" has ABOUT 1950 records with only 2 text fields: one called "serial_number" and the other called "word". Each contain unique values. I want to add a calculation field called "pword" to "signup.fmp12" which fetches one random word from "2000-words.fmp12" So each record in "signup.fmp12" will have one randomly-different word in the field "pword". (Strict randomness is not essential) I am unsure how to "connect" these 2 files so that this can be done. Could some kind person please give me some nice clear "idiot-proof" instructions on how to do this. and how to create my "pword" calculation field. (Note: the unique "serial_number" associated with each unique "word" in 2000-words.fmp12 may be of help in this calculation, or it may be quite un-needed!!)
  6. Thanks comment. That doesn't quite work as I expected! Here's my calculation: Let ( [ lineStart = Position ( input ; "¶Your wording (up to" ; 1 ; 1 ) ; lineEnd = Position ( input ; ¶ ; lineStart + 1 ; 1 ) ; start = lineEnd + 1 ; end = "Image Choices" ] ; Middle ( input ; start ; (LineEnd - LineStart))) My 'input' includes the following text: Your wording (up to 500 letters/70 words) This is my wording of up to 70 words. On several lines. Optionally finishing with a return. Image Choices A small image (your Wording will run around it) The result I get is 2 lines only, truncated after the 4th char of the 2nd line: "This is my wording of up to 70 words. On s" when what I expected was all 3 lines: "This is my wording of up to 70 words. On several lines. Optionally finishing with a return." What have I done wrong??
  7. Sorry that I was not clear. Assuming the following as part of 'input': Your wording .......other text........ up to 140 characters This is the 1st line of the customer's wording [return] And this is the 2nd line [return] And this the 3rd & final thing the customer typed [maybe a return] Upload an image what I need is a calculation field which extracts the following: the text starting with "This is....." and ending with "the customer typed" [plus return if there is one] In other words, the "start" of extraction is marked by a line beginning "Your wording" and the "end" is marked by a line beginning "Upload an image"
  8. Hi. Could I ask for another version? At present, the "second one" extracts the text up the end of the line. What I need **also** is a version of that code which extracts all text (including any 'returns') from the beginning until the occurrence of specific text (such as "Image Choices")
  9. Thank you comment. The first one worked perfectly **AFTER** I included an "end of para" character at the end of the search string!! And the second one worked equally well, with the advantage that if I later make small changes to the web-form labels I don't have to remember to redo the FM db, as long as the first few (unique) words remain unchanged!! Thanks again.
  10. Thank you comment, but I believe you have misunderstood my data and my need...... Firstly, perhaps I should explain that the content of 'input' is copied-and-pasted from an online website-form result. The form has 6 fields which have data entered by a customer, plus 2 (Entry# and Date Submitted) which are added by the form-software. For example the line saying "Which CATEGORY would you like your Ad to be in?" is something which will always be the same in every record. The line saying "Category chosenxxx" was my test input to that field in the online form. SO -- THIS IS THE TEXT that will vary from record to record -- and is the text I want 'extracted' to be the content of the field 'extract_category' (which I actually forgot to include in the 8 fields I wanted!!!) If the line starting "Which CATEGORY etc etc" has to be included in full to be used that will do. But I would prefer if just the first 2 words were sufficient to identify it.
  11. I have a field called 'input' an example of whose content is shown below. I need to extract 8 pieces of information out of this, each into 8 separate fields named as follows: extract_entry_number extract_date_submitted extract_region_chosen extract_headline extract_wording extract_filename extract_email Can you please provide the best/easiest way (calculation?function?) for each of these 8 fields to be populated from the content of 'input' (Note: any of the 8 pieces of data 'input' can be of arbitrary lengths in different records) (Note: lines of text starting "Entry #:" and "Date Submitted:" and "Which" and "and which" and "Create a" and "Your wording" and "Upload an image" and "Your email" will always be the same every time) //////Example content for 'input'//////// Entry #:3 Date Submitted:02/04/2019 00:06 Which CATEGORY would you like your Ad to be in? Category chosenxxx and which Region? (leave blank for All London) Region chosenxxx Create a Headline for your Ad (up to 40 letters) Headline herexxx Your wording (maximum 140 letters + optional small image) or you can upload a JPEG or PDF file of your complete Ad. Wording of up to 140 chars herexxx Upload an image or logo file here... (JPG or PDF) jfa-favicon.png 2.36 KB Your email address (required) - will be used for confirmation philip@personality.co.uk Delete Edit
  12. To answer: "why not have the data formatted out as needed?"...... it's because I find that FMPro's Export produces results that don't behave well when used as HTML, and those 2 search-and-replaces cleans everything up nicely. As regards the structure, the numbered fields are needed because I need the Exported textfiles to match my website's requirements for the files it uses. Each time I need to update the contents of my site (a PHP static ecommerce site) I do an Export from the FMPro database [in which I keep track of price changes and new/changed products] and then FTP the complete folder to my webserver, rename it, and all the pages of my website get updated immediately with all my changed details, prices, etc, because each page is set to "get" a textfile named the same as the product code. A more automated approach to generating the website would not work, as the products I sell are not under my control (it is a service of printing leaflets, books, etc for which I have to use a different supplier for each one, and so prices/sizes/quantities/specifications/speed-of-delivery vary wildly from product to product). Therefore my home-grown FMPro database is just good enough to do the job!! I really appreciate your help. Both you and "comment". Many thanks, Philip Caplan
  13. Thanks Ocean West. I tried it and it looks like it works perfectly! Yay! I will do some full testing, but if the first ".txt" file I tried works perfectly when uploaded to my website, I am hopeful they all will!! But before I can do a full test, each file needs to have 2 search-and-replaces done, and preferably the extension ".txt" removed. I am using BBEdit to handle my text files, and I found that I can use its "Scripting" capabilities to create and run an Applescript. By "recording" my actions I got the following Applescript: tell application "BBEdit" activate open find window replace "§§§" using "\\r" searching in text 1 of text document "BC_102.tab" options {search mode:grep, starting at top:true} replace "\\x{0B}" using "" searching in text 1 of text document "BC_102.tab" options {search mode:grep, starting at top:true} save text document 1 end tell The above script works for one [selected] file, but I need it to: (1) perform as above on EVERY file in a selected folder; (2) "save as" with file-extension removed, then delete the original file. So, are you also able to help me in doing this with Applescript?? I thought I'd ask before looking anywhere else, just in case!! Don't worry if it's not your thing! You've been very helpful to me, and I am most grateful. I said ".txt" file but of course I meant ".tab" file. I think FMPro might always Export UTF-8 files with a ".tab" extension, whatever you tell it to do......
  14. Here's the whole database. I got nuthing to hide!!! Reliaprint1.fmp12.zip
  15. Hold it!! First the good news, I realized (by turning "dialog on" in the Export script step) that the Field Export Order that was to be exported was missing!! So, I edited the script to add it, and the Export worked. Now the bad news: the file that is created is not of use, because it's content is different from the file that would be created by doing a "manual" Export. A "manual" Export makes a file with all the contents of the Field included, one after the other, so the file contains all the Field contents for every Record in the Found set. The "scripted" Export makes a file containing Field contents for a different SearchKey!!!! Help, please.
×
×
  • Create New...

Important Information

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