Jump to content


  • Posts

  • Joined

  • Days Won


Everything posted by comment

  1. I am afraid not. As I said, I rarely work with videos in container fields. And I am still on v.18. I would suggest you try and see if the problem can be reproduced in a brand new file. If so, report it as a bug. Show all records, click in the (newly added) Filename field and select Records > Replace Field Contents… > Replace with calculated result = Let ( pos = Position ( YourContainerField ; "/" ; Length ( YourContainerField ) ; -1 ) ; Replace ( YourContainerField ; 1 ; pos ; "" ) ) Make sure to have a backup before you try this, as there is no undo if you make a mistake. Just paste or type G:VIDEOS/ into it. Then, for a web viewer (or a browser, if you want ) use: "file:///" & gFolderPath & Filename and for a container field: "movie:/" & gFolderPath & Filename
  2. I don't know that anything is supposed to happen when you open the record (unless you have a script trigger to make something happen). I rarely work with container fields, and even more rarely with videos in container field. Doesn't clicking the triangle make it play? IMHO Filemaker interactive container fields are not yet mature technology. My tendency would be to store the filename (and if applicable, the path from the master folder to the file) in local text fields, and the path to the master folder in a global field. Then you have full flexibility: you can move the entire collection to another location and change only one field; and you can choose to display the files in a web viewer or in a container field populated by a calculation. But there are other options to consider, e.g. letting Filemaker manage the external storage: https://help.claris.com/en/pro-help/content/store-data-externally.html
  3. These paths look like they point to the correct location . What exactly "no longer works" with the container field? In any case, if you want to display the files in a web viewer, you could do one of the following: (a) convert the last path stored in the container field to a URL path - but this will only work if the stored path is indeed correct; (b) extract the filename from the container field and append it to the path to the VIDEO folder - but this will only work if all files are at the top level of the VIDEO folder. To do (a): ConvertFromFileMakerPath ( GetValue ( YourContainerField ; ValueCount ( YourContainerField ) ) ; URLPath ) To do (b): Let ( [ pos = Position ( YourContainerField ; "/" ; Length ( YourContainerField ) ; -1 ) ; filename = Replace ( YourContainerField ; 1 ; pos ; "" ) ; folderpath = "file:///G:/VIDEOS/" ] ; folderpath & filename ) If this is successful, you could place the folder path in a global field and reference it in your calculation instead of the hard-coded string. This would allow you to easily move the files to another location. All of this is untested.
  4. Hard to tell from your description. To answer your question, we would need to see an example or two of the original path as stored in your record, and the expected resulting path after the conversion. You can tell what the resulting path should look like by dropping one of the files located on the external drive into a browser window and observing the browser's address bar.
  5. I don't think you would want to do that. It goes against the very core principle of a relational database that each fact is stored in one place only.
  6. I believe the most common method is to keep a one-record Preferences table with 2 fields (or rather 2 sets of fields): a regular field and a global one. Then have your startup script populate the global fields with their regular counterparts. Alternatively, you could open the file locally, populate the global field, then host it again. But you would have to do this every time you want to change the logo (or any other preference).
  7. That is the expected behavior of global fields in a hosted solution. At the beginning of each session, global fields are initialized to the values they held the last time the file was opened locally. Any changes to these values last only for the duration of the session and are limited in scope to the user that makes them. https://help.claris.com/en/pro-help/content/global-fields.html?Highlight=global session
  8. I would imagine something like: ... Perform Find [ ] Go to Record/Request/Page [ First ] Set Error Capture [ On ] Loop Send Mail [...] If [ Get (LastError) ] Set Variable [ $errors; List ( $errors ; YourTable::Email & Char (9) & Get ( LastError ) ) ] End If Go to Record/Request/Page [ Next; Exit after last ] End Loop ... then do something with the $errors variable (show it in a custom dialog or set a field with it)?
  9. The problem with a single example is that it not always represents all possible cases. It is very easy to extract the first line of text from a field using the GetValue() function. However, then comes the question where does the house number end and street name begins. If all addresses follow the same rule of house number being the first - and only the first - word in the extracted line, you could make your script do: Set Variable [ $streetAddress ; GetValue ( YourTable::SourceField ; 1 ) ] Set Field [ YourTable::HouseNumber ; LeftWords ( $streetAddress ; 1 ) ] Set Field [ YourTable::StreetName ; RightWords ( $streetAddress ; WordCount ( $streetAddress ) - 1 ) ] If you are importing the data. you could make this a part of your importing script.
  10. 3 is just the script parameter attached to the button. Unrelated to your question, but I would be reluctant to use a portal showing 400+ records.
  11. I am not at all sure I understand what are you trying to do. Does the attached demo come close? SumPrevNinPortal.fmp12
  12. The answer depends on how you intend to make a choice. If you want to use a value list (e.g. select from a drop-down menu) you will need to construct a so-called "dwindling" value list (look it up, there are many examples here such as this one). In this case, you would need to have an unstored calculation field in the Lenses table listing the IDs of all incompatible treatments related to the current lens via the already selected treatments. Then use this as the match field to an occurrence of the Treatments table using the ≠ relational operator. Then define the value list to show only related values from this occurrence. Alternatively you could select from a card window showing a list of compatible treatments. This would be accomplished by using Go to Related Record to create a found set of all incompatible treatments related to the current lens via the already selected treatments, then showing omitted records. This has the advantage of not requiring any additions to your schema beyond the relationship of treatments to incompatible treatments as given by the original XML.
  13. I believe you are experiencing the same problem as the one you did here: https://fmforums.com/topic/106996-problem-with-script-inserting-text-into-field/?do=findComment&comment=483157&_rid=72594 Either use Set Field or at least enable the 'Select entire contents' option*. -- (*) This is assuming Events contains a single value. If it's a checkbox or similar, then you will need to deploy a significantly different strategy.
  14. I am having trouble following the logic you describe. It seems you want to mark the first record in a consecutive group of records that have a match (in either field?). If so, it should be possible to loop over the records and do something like: if a match is found and $match is false, mark the record and set $match to true; if no match is found, set $match to false; As an aside, it seems like there should be a simpler way to accomplish whatever this is supposed to accomplish - but you did not tell us anything about that.
  15. So far you had only one entity - Treatments. Now it seems you also need to have some kind of a list of lenses (an Order?) and each lens on this list has its own list of selected treatments. And the list of selected treatments (for an individual lens) should not contain mutually incompatible treatments. Is that a correct understanding?
  16. Could this be the answer: https://help.claris.com/en/pro-help/content/showing-hiding-field-frames.html If not, please post a file showing the problem. It's also not clear whether you and your friend are using the same file or two files - IOW, do you see the frames when using his file on your system?
  17. I mean that without a join table you cannot produce a report like this: Treatment A • Incompatible: Treatment B • Incompatible: Treatment D • Incompatible: Treatment E Treatment B • Incompatible: Treatment A • Incompatible: Treatment C Treatment C • Incompatible: Treatment B Treatment D • Incompatible: Treatment A Treatment E • Incompatible: Treatment A from the data you have. You need to have 3 records of Treatment A in order to produce the 3 rows that show this value. You can only show the incompatibles for each individual treatment, one treatment at a time.
  18. I am not saying it's wrong. I am just puzzled how do you populate the FK values in the join table if you import into in. This goes back to the question whether users will be adding data. If import is the only source, and their codes are unique, I would not bother with adding my own keys.
  19. I now see this is a cross-post: https://community.claris.com/en/s/question/0D53w00005UQ6gtCAD/how-to-loop-a-mp4-in-a-container-field- Please next time include a link so that we can avoid duplication of effort.
  20. It means a field whose type is Calculation, using a formula like this: List ( VWIncompat::Treat Id ) and the result type is Text. Then you will use this field as the match field in a relationship defined as: VWTreatment::cIncompatIds ≠ VWCompat::Treat Id where cIncompatIds is the calculation field and VWCompat is the 3rd occurrence of the Treatments table (I am somewhat confused by your having both a Treat Code and a Treat Id field. I thought you were importing the data from the XML which has only the codes.) Now, at the risk of confusing you even further, I need to say this: in this arrangement, the relationship between treatments and compatible treatments will be many-to-many without a join table. That means you will face the same limitations on reporting as mentioned earlier WRT incompatible treatments. Technically, you should have a giant join table listing all possible treatment pairs, with a field denoting compatibility as true or false. However, this would be both impractical and redundant. The detailed reporting, if necessary, could be produced using a technique known as "Virtual List". Why am I mentioning this? Because if you're going to rely on virtual list for reporting on compatible treatments, you might just as well use it for reporting on incompatible treatments too. Which brings me back to my earlier suggestion to implement the relationship to incompatible treatments without a join table too.
  21. This too is an HTML question. I have no personal experience with this but I see that the video element can have an autoplay attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-autoplay You say the file is in a container field. Does it work if you pass the container data to the web viewer as Base64 encoded?
  22. I don't think it's possible to have a video play in a loop inside a container field (without a plugin). However, it should be possible to use a web viewer for this. This then becomes a question in HTML, not in Filemaker - see for example: https://www.w3schools.com/tags/att_video_loop.asp
  23. It is indeed difficult to find: https://store.claris.com/teams
  • Create New...

Important Information

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