Jump to content

Asu

Members
  • Content Count

    45
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Asu

  • Rank
    novice

FileMaker Experience

  • Skill Level
    Intermediate
  • FM Application
    17

Platform Environment

  • OS Platform
    Mac
  • OS Version
    10.14

Recent Profile Visitors

1,110 profile views
  1. Sure but this is a concept question. Thank you for your answer. Sorry, I forgot to ask the other half. Now I need to set the "active field" to a value.
  2. Hello FM Mavens, I need to accomplish the following task. I have several fields, sequentially tabbed, named A, B, C, D etc. Each of them can be set to 0, 1, 2, 3 or 4. User sets some of the fields to a number other than 0 THEN: I need a script that sets the fields that were left empty to zero. Obviously it could be done by explicitly defining the fields but there are dozens. I thought of something like Go to next field, if (isempty "next field") set "next field" to 0. The problem is that the (isempty <field>) function requires an explicit field definition so how do I accomplish that? Or there may be a better solution? Thanks Asu
  3. Thanks but nothing over $10/month is worth it. It is a personal database.
  4. Hello - I have a simple, single-user (for me, written by me) FM solution that I need to access from multiple locations. I am ashamed to admit it but currently it is on a Dropbox account. I sort of works but it is a pain. What would be the cheapest way to host my file? Thanks, Asu
  5. Re the original question: A problem with the solution is that if the text that needs to be reduced in size begins with bold characters then the entire resized area becomes bold. is there a way to avoid it?
  6. Hello FM Mavens, I am likely missing something. I have a script step that calculates the dimensions of an image in a container field. There are many such fields so the script should work with any arbitrary one. I get the name of the field by using script parameter Get(ActiveFieldName). Let's say I have a container field "cont1". The script is triggered by entering the field. I am trying to calculate the height of the image by using GetContainerAttribute (Get ( LayoutTableName ) & "::" & Get ( ScriptParameter ); "height" ) The results are question marks - I am not sure why. If I explicitly identify the fields then the expression works. Tried the same expression (Get ( LayoutTableName ) & "::" & Get ( ScriptParameter )) in the script step "Set Field by Name" and it worked, which means that the expression correctly identifies the field the script is attached to. Then why is it not getting it the first step? What's wrong with the calculation? (FM17) Thanks Asu (I hope I posted it in the correct section)
  7. Asu

    Go to field

    Ah, OK. Off to the bank :). Thanks for your reply.
  8. Hello FM experts, this is a concept step for a more complex script but I need a script that has 2 independent features: 1: it selects the field it is attached to as a button 2: it can be attached to any arbitrary field and it does the same on that field. The imaginary script step would be this: Select field [the one I am attached to] The problem I am running into is that "go to field" can not be defined by calculation, while "go to object" gets confusing between the script and the field being grouped, as the problem detailed here [https://www.soliantconsulting.com/blog/story-about-go-to-object] seems to be a complicating factor. Thanks Asu
  9. Asu

    Script loses related records

    No, I have not run it in the debugger, as it is a single step (action c is irrelevant to the script, as it can be any other action that could be done on a set of related records. ) and the naked eye can see what happens. My guess was that something was not working in FM and Agi's post supports my suspicion. And thank you for the advice, I will return to FMPro v5 and do a search and find. As for indexing, I have tried every variation and their combinations on both ends but to no avail. Thanks for all yall's help
  10. Hi FM Mavens, this will be long, I am sorry. The following is the setup: Small medical office database I am writing for myself. 4 tables: "Pts", "Encs", "Rxs/RxDup" (patients, encounters, prescriptions - patients have several encounters, encounters have several prescriptions.) RxDup is a duplicate of Rxs but that is not why it is called RxDup, it is called that because it is used to duplicate individual medication orders. Mac OS 10.13.2, FMPro Advanced 15.0.4.400 Task: (a) selecting an arbitrary number of records in a portal within Pts that looks at Rxs by setting the match field to a certain value (b) going to the records that become related via this act and (c) doing something with those records (duplicate them). (c) is not problematic. (a) and (b) are. Relationships: Pts - Encs via _PtID, Pts - Rxs also via _PtID, Encs - Rxs via _RxID and Pts - RxDup via _RxDupID. _PtID is a serial number of patients. It is added to every new encounter record for any patient in table "Encs". This is clear and it works as it should. _RxID is a combination decimal number obtained as _PtID + encounter serial for that patient * 0.001. So for patient #25, prescriptions written on visit 1 will be matched between "Encs" and "Rxs" via 25.001, etc. This also works as it should. As table "Rxs" also has _PtID, all prescriptions are visible from table "Pts". This also works as it should. All these are static values. I mention these only for the sake of completeness, there are no problems here. _RxDupID is the value of _PtID combined with the term "dup" (a text field) e.g. "25dup". It is the match field between tables "Pts" and "RxDup". In table "Pts" _RxDupID is a static calculation text field. In tables "Rxs/RxDup" it is a text field that can be set to the match value or to "". The setting occurs via clicking a checkbox on or off in the portal looking at "Rxs" from "Pts" via the _PtID relationship. The value list attached to the checkbox is the value of _RxDupID in the active "Pts" record, obtained via a Pts-to-Pts self-relationship using PtID. This also works, i.e. the value of the match field in the Rxs records seen in the portal is correctly set to the single value that shows up in the value list. I assume that this occurs in RxDup as well necessarily and simultaneously. (Am I correct?) The following happens: I open the database, go to today's set of patients. I go to one of the 5 patients whose records are in today's found set. Let's say it is Pt #25. I tab to the portal showing Rxs, let's say there are 30 previous rx orders showing. I click the checkbox in 3 records. I see it confirmed that the match fields are set to what they should be (PtID & "dup"). I run the script Go to Related Record [ From table: “RxDup”; Using layout: “Rxs DUPLICATOR” (RxDup) ] [ Show only related records ] Do (c) It does what it is supposed to do. It goes to the 3 related records in the correct layout and does (c) on them. Then I go to another one of the 5 patients in the found set. Let's say it is Pt #56. I tab to the portal showing Rxs, let's say there are 50 previous rx orders showing. I click the checkbox in 6 records. I see it confirmed that the match fields are set to what they should be (PtID & "dup"). I run the script again. Here it becomes dicey. There are a few ways things can go wrong here: - The script takes me to the 3 related records of Pt #25 and does (c) on them. - The script takes me to the related records of Pt #56 but not all 6 show. If I go back to the portal in Pts and run the script again, this time it may show all 6 records. - The script takes me to some or all of the related records of Pt #56 but in some records the match field is blank. (This really baffles me) Then it becomes really interesting. I go to a third patient in today's found set, lets say it is Pt #77. I run the script again. I get a 101 Error. The script does not go to the related records in table "RxDup", it stays in table "Pts" and runs (c) on the 5 records there. This repeats reliably. On first run, and sometimes on second, the script works well. On runs 2 - 4 it makes an error in going to the correct (or correct number) of related records. Eventually it does not go to the related records at all. The indexing of both match fields are set to "All". I tried "None" with "automatically create indexes" but the result is the same. My guess is that something goes wrong with the indexing but I could be wrong of course. Any help would be much appreciated. Thanks, Asu
  11. $contfield will be different depending on which field will activate the script, thence the need for a script parameter. wd/ht are calculations: GetContainerAttribute ( container1 ; "width" ) etc. I'm sure this could be tighter but this is just a test file. I tried adding explicit "-s to the FieldName but it still does not work
  12. Script parameter set by specifying Optional Script Parameter as GetFieldName ( Untitled::container1 ) or 2 depending on the field clicked. Yes, it resolves to Untitled::container1/2. And this is a simple test file with one table. I am not sure how to set two different script parameters with one step.
  13. Hello, I have a Case calculation that does not return what I expect wd1 = width of image in container1 , ht1 = height of image in container1 wd2 = width of image in container2 , ht2 = height of image in container2 A script would open up a popup window sized to the parameters of the image in the container. This is how it starts: Set Variable [ $contfield; Value:Get ( ScriptParameter ) ] //which is the name of container1 or 2 which it gets correctly Set Variable [ $ht; Value:Case ( $contfield = Untitled::container1; Untitled::ht1; $contfield = Untitled::container2; Untitled::ht2; "ERROR") ] Set Variable [ $wd; Value:Case ( $contfield = Untitled::container1; Untitled::wd1; $contfield = Untitled::container2; Untitled::wd2; "ERROR") ] The calculations return "ERROR". Which I don't understand as I would expect $ht/wd to be set to the corresponding numbers in ht1/2 and wd1/2. What am I doing wrong? Thanks
×

Important Information

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