Jump to content

steveald

Members
  • Content count

    94
  • Joined

  • Last visited

Community Reputation

0 Neutral

About steveald

  • Rank
    novice

Profile Information

  • Gender
    Not Telling
  1. I'm not sure if this is the right forum for asking this question. If someone knows a better place and can do so, please feel free to move it. I have to create many layouts in our main database using formatted static text mixed with merge fields. Attached is an example of what three sections of this text might look like. The dollar amounts are merge fields which display data that is calculated based on selections made elsewhere within each record. I use merge fields to make the surrounding text move based on how many characters are in the merge field data. Normally, I create each layout knowing exactly which sections I want to appear on that page. If there needs to be a handful of combinations of sections, I just create a layout for each one. But I now have a situation where any number of sections (usually between 1 and 8) will need to appear on a page. And there are 32 sections to select from - each with merge field data unique to the record they are found in. Obviously, creating one layout for each possible combination of sections is not realistic. So, I thought it would be nice to be able to create a layout where I could drag each required section to it's own place on the layout. Drag and drop between container fields won't work because we are talking about text with merge fields containing data that needs to change based on selections made elsewhere. And I think moving text between fields could too easily open up the possibility of errors. If it helps, the merge fields (and possibly even the static text) could also be displayed as Edit boxes or something else. Thoughts?
  2. I think I see how that works, comment. But I'm confused by the calculation line: spaces = Char ( 82030820308203082030820308203082030820308203 ) // / 9 x zero-width space
  3. Thanks, webko. I saw where it talked about how to generate a de-incrementing list of numbers. But I need to be able to specify the members of the list as they are often not equally incremented - like in the example comment posted above. Any thoughts on that?
  4. Thanks. I'll see what I can do with that. Unfortunately, some of those lists contain 60 values.
  5. Is there any way to control the order that the members of the List appear in the Pop-up Menu? The reason I ask is - I am using this process frequently and, in some instances now, I need the numbers in the Pop-up Menu to appear in reverse order with the largest number at the top. In the calculation above, it doesn't matter which way I have the numbers entered in v = List - 125 ; 250 ; ... ; 2500 or 2500 ; 1250 ; ... ; 125 or even scrambled. The numbers always appear in the Pop-up Menu in normal numerical order with 125 at the top and 2500 at the bottom. That makes me think there is some function of Pop-up Menus that dictates the order in which a list appears. Does that mean there is a setting somewhere, or I function I can add to the calculation, to override the default order?
  6. Thanks again, comment. Oddly enough, the AppleScript worked on my home computer but not my work computer (both running current versions of everything) with the on idle steps in place. And putting the AppleScript lines into a Perform AppleScript step set to Native AppleScript did nothing on either machine. The minute I took out the on idle steps, it worked everywhere, but I think I lost the process of checking the VPN connection periodically when I did that. I'll try your suggestion on that count. The AppleScript in it's original context was supposed to be saved as a stay-open application, like you said. Any thoughts on how to achieve the same goal on a Windows 8 machine? I've heard I might need to use Send Event or VBScript. Should I post that request elsewhere to get the full attention of the Windows experts here?
  7. XPOST Our company is switching to VPN for remote users to to connect to our FMS-hosted databases. So I want to incorporate connecting to VPN into our already established procedure for accessing those databases via a FileMaker script. Our VPN connection is up and running. And I found an AppleScript that works well making and continually checking the VPN connection. But I don't know enough about AppleScripts and how they apply to FileMaker scripts to make it work. From what I could find on the subject, I need to modify the AppleScript steps to work in FileMaker; such as adding a \ in front of each double-quote. But, apparently that's not all. Here is the raw AppleScript code: on idle tell application "System Events" tell current location of network preferences set myVPN to the service "VPN NAME" if myVPN is not null then if current configuration of myVPN is not connected then connect myVPN end if end if end tell return 60 end tell end idle And here's what I did: I created a new FileMaker script and added one step - Perform AppleScript. In the step options, I selected Native AppleScript and entered the above code. (Using Calculated AppleScript didn't appear to be the right choice for this method.) I saved the script and tried running it, but nothing happens. No errors, nothing. From what I was able to find on the subject, I assumed the problem lies with how the AppleScript text is formatted in the script description. But, nothing I tried worked. Can someone show me what needs to be done with the above AppleScript to make it work in a FileMaker script? One major issue may be the restriction: "Indenting of repeat loops and conditional statements is not supported." This may limit me to stripping the AppleScript down to just the connect VPN portion. But, I really liked what the AppleScript offered in the way of checking regularly to make sure the connection is still active and to re-connect if it isn't. So, if there is another way to do this, I'm all ears. Finally, just in case there is a better method for all of this that I am just not aware of, here is the "big picture": My remote users each have a small database file they open every day to access our FMS Server-hosted databases. The file contains one button which activates a script that opens the required databases. Switching to VPN simply meant setting up the VPN connection on each computer and changing the External Data Sources in the local database. What I hoped to do is to modify the script so that it first makes the VPN connection and then, once that's completed, opens the databases. An alternative process might be to create a separate script to make the VPN connection and that script could be set up as a Script Trigger which activates when FileMaker is first started up or the file is first opened. Just to complicate matters, I also need a similar FileMaker script that will connect to VPN on a Windows 8 machine - which, of course, precludes using AppleScript.
  8. You nailed it! I told you this was an old database. The SameRecord relationship is defined by a Serial Number field containing a value that is unique to each record. The trouble is, that first record and a handful of other records created years ago all have the same value - 0000. I'll have to see if I can override the values in those records with something unique to each one. Thanks again.
  9. I should be okay there. I first created a Calculation field MNL LMB A Amounts, which contains the formula we settled on above. From that, I created a self-joining Value List MNL LMB A Benefits, set to Use values from the field: "SameRecord::MNL LMB A Amounts". Finally, the designated field is formatted as a Pop-up menu using Values from: MNL LMB A Benefits. I create a new set of elements every time I set one of these up. When added to the layout, the repeating field shows the correct values in every record I checked (either the list of numbers or Y and N) - including in that first record. But the pop-up menu in that first record (and in a handful of other old records) still shows the full list of numbers followed by N and Y (the N and the Y in reverse order). Weird.
  10. ValueCount makes more sense in this case. And your new formula works well - once I changed the Calculation Result to Text. But my original test record got me again! I initially forgot to test this on a newer record. Oddly enough, where your new formula is working fine for almost all records (including two of the three that I said earlier were misbehaving), it's still not working right on the first record in the database. It's showing the full number list and then N and Y in the pop-up menu - for any value of MNL LMB ST. Durn abnormality! Thanks again. I'll be able to use this many different ways, I think.
  11. Just for ease of explanation let's say, if MNL LMB ST does not equal "2012", then the Y / N list needs to appear (instead of the longer list of numbers). Your example looks just like one of the formulas I tried myself. Unfortunately, the result is the list of numbers plus a question mark - whether MNL LMB ST is "2012" or "2015". Here's how I applied each version: I'm understanding more than before. Just not enough yet to format solutions properly myself. I'm sure I missed something basic.
  12. comment, any thoughts on how to handle displaying two different lists? I may need to switch between lists something like "125, 250, ..., 1250, 2500" and "Y, N".
  13. That was the thing. After I applied your last formula, I checked it by switching the state for that record from one that showed 2015 to one that showed 2012. But the pop-up menu always showed the 9 value list. At first I thought "i" wasn't ever hitting 6. Then I looked at the fact that MNL LMB ST was a text field, as was the referenced field in the lookup database. First I tried modifying the formula, then I changed them to number fields. Somewhere in there I also thought to see if the issue only applied to existing records - which I have seen before. It worked correctly in a new record - and in some existing records. So, I tried the steps listed above to get all the existing records to work. (I need to be prepared for the possibility that I will want to use this field in an old, existing record - as well as new records.) That's when I discovered it was only a handful of records that weren't working - including the first three in the database, which date back to 2003. I usually use the first record for all my testing. If something works there, it's sure to work everywhere else. Oddly, out of the over 1,200 records that are currently set to the states those first three records show, only a handful don't work - even after manually deleting and replacing values in both the state and MNL LMB ST fields. So, yes, I am sure the field contains exactly and only 2012. I will switch the fields back to text since they can contain text and I now know this works and it won't make a difference. The possibility of file corruption, or "some abnormality,", had occurred to me - especially with the older records. If the company ever decides to shut down for a couple of weeks, I'll probably use the time to completely rebuild the databases from the ground up. ;-)
  14. There is only one other possible entry for MNL LMB ST - that being "No". It is a lookup field controlled by the State the record is set to. Records in eligible states are assigned either 2012 or 2015. Ineligible states are assigned "No" and those records have no use for the field with the pop-up menu. So your method works fine. It is possible that the state might be changed for a record though, so everything needs to take that into consideration - including the pop-up menu list. I see what you did there. And that did the trick. Once I converted MNL LMB ST from a text field to a number field. And made the same change to the corresponding field in the lookup database. The odd thing is, I can't seem to get all existing records to correctly show only 6 values when MNL LMB ST contains 2012. I tried Relookup, Replace Field Contents, as well as manually deleting and reentering data. It's not a serious issue as it involves only about 0.1% of the existing records and this field may never be used in those records. But, it's a little annoying that it's not working perfectly. Who knows how much trouble I ran into unnecessarily since the test record I was using is one of those that isn't working properly. Thanks again for providing the needed solution, comment.
  15. Allow me to back up a bit then. I have a field (MNL LMB A Amounts) configured as a pop-up menu which needs to contain one of two sets of numbers depending on the value that appears in another field (MNL LMB ST). If calculations in a record result in 2012 appearing in MNL LMB ST, then the shorter list of numbers which starts at 125 and increments by 125 to 750 should appear. If, however, 2015 appears in MNL LMB ST, then the longer list of numbers should appear. That much is fairly basic. The issue is, while the longer list also starts at 125 and increments by 125 to 750, it then increments by 250 to 1250 and then increments by 1250 to 2500. Does that make more sense? Using what I already know and have used several times before, I hoped there might be some way to configure MNL LMB A Inc to allow for multiple increments. If there is another better way to tackle this problem, I'd be glad to learn a new process.
×

Important Information

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