"... you mean these fans?" Posted December 22, 2018 Posted December 22, 2018 Hi, Singles::PSBestOptA = "Same" "Singles::PSBestOptA produces the following; a "0" or "Same" or "Best" and I've test with "number" and "text" When "Singles::PSBestOptA" has a "0" in it, FileMaker allows ... meaning "0" = "Same" ?? what, impossible but I've tested it. Changing "Same" to "t" FileMaker does not allow or match or whatever is going on ... ???? I need understanding here. FileMaker should not allow; "0" = "Same" yet it does ??? Can someone help me with this ...
comment Posted December 22, 2018 Posted December 22, 2018 Could we have a translation to English please?
Josh Ormond Posted December 22, 2018 Posted December 22, 2018 Guessing here. Try using Exact ( Singles::PSBestOptA ; "Same" ) or whatever you are testing for. Or post a sample file.
"... you mean these fans?" Posted December 22, 2018 Author Posted December 22, 2018 Hi, The best translation I can do at this moment ... I will try "Exact" Josh and advise.
comment Posted December 22, 2018 Posted December 22, 2018 I am afraid you overestimate both my ability and my patience.
"... you mean these fans?" Posted December 22, 2018 Author Posted December 22, 2018 comment, Ok great thanks ...
LaRetta Posted December 22, 2018 Posted December 22, 2018 (edited) Why are you using nested IFs? In even the most complex solutions, I've never needed to write something that ... strange. added ... BTW, that isn't a script step, that is a calculation. You have fields with different numbers at the end ... prime example of a structure in deep trouble. Edited December 22, 2018 by LaRetta
Josh Ormond Posted December 22, 2018 Posted December 22, 2018 The Case ( ) function is better suited for your needs here. However, a nested IF ( ) can work. Honestly, the calc looks like it should calculate as you said, assuming the data is as you claim. To diagnose further, we really need to see the file, or a sample of it that demonstrates the problem.
"... you mean these fans?" Posted December 22, 2018 Author Posted December 22, 2018 LaRetta, Actually it's script step 572 and I have to look for all these possible conditions on the Press Sheet. This is the best I can do ... I have not idea what this means ... can you clarify ... 14 minutes ago, LaRetta said: You have fields with different numbers at the end
Josh Ormond Posted December 22, 2018 Posted December 22, 2018 I believe @LaRetta is referencing the fields names like: Quote SecSub::Search 1 AutoCreate W Ordered SecSub::Search 1 AutoCreate TotalPage By Form Naming fields and tables is a bit of an art. But the easier the names are, the easier it will be to look at the code and know what's going on. Adopting a naming convention, and sticking to it will make your recognition time faster, as well.
LaRetta Posted December 22, 2018 Posted December 22, 2018 PSOptATx_Additional_1, PSOptATx_Additional_2 ... and more. Whenever you see multiple fields named the same but followed with a 1, 2, 3 ... etc, it means you probably should be using related records instead. The fact that you have this type of complex calculation and the fact that you have a single script with 572 steps, all points to an overly-complex solution. You will continue to have a nightmare developing in such a structure and I (again) highly recommend that you step back and seek professional assistance in fixing your issues once and for all (and no, I'm trying to drum up business because I am not available right now anyway). I say it only because somebody needs to provide you with a reality check. We would be providing a disservice if we did not tell you the truth here. 😐
"... you mean these fans?" Posted December 22, 2018 Author Posted December 22, 2018 (edited) LaRetta, Yes it is complex ... this individual came to me asking to remove the "Human" from the quoting process ... I am writing in 30 years of human evolution ... not sure if we will come through with our skin let along with our teeth. Haha, just kidding. Unfortunately we don't have $100,000, just the two of us ... my experience with FileMaker and his experience in the printing industry. I am grateful for this forum and I will continue to ask questions .... Thank you. Edited December 22, 2018 by Mr. Ignoramus
LaRetta Posted December 22, 2018 Posted December 22, 2018 1 minute ago, Mr. Ignoramus said: Unfortunately we don't have $100,000, just the two of us ... my experience with FileMaker and his experience in the printing industry. I can understand inheriting a mess; believe me. But if someone quoted you $100,000 to fix your solution, they saw you coming. 😱 Seriously though, have you even checked with a few reputable GOOD Developers on how you might improve your solution? I suspect not. I've switched out many highly-complex systems that were twisted for under $10,000, making substantial changes from flat-file to relational and simplifying their lives (reducing 600 fields to under 100) and there are many Developers who could help you with it. Nobody says you need a complete rewrite but you'll never know how it can be improved if you don't check. Anyway, I wish you well with your project.
"... you mean these fans?" Posted December 23, 2018 Author Posted December 23, 2018 LaRetta, A lot of love here in the forum, but I did what the forum suggested ... reach out .. and to get anybody with any FileMaker experience that could handle me and what I am requiring ... at the low end of the scale ... $1500 up front deposit. I require a mentor/coach 7 days a week 8-10 hours per day for 5 years ... I don't have that kind of cash sitting around. So they say pay the 1500 and I did ... once, eating up in emails and then having to school the individual in the concept, then I have to schedule. The last one, scheduled me into the following week. I am not waiting a week anymore ... So I do the best that I can, step into what you call this "Reality" and figure it out. 1500 / 8 = $187.5 $187.5 x 4hrs x 5d x 52w = $195,000 ... now that's real. This forum continues to help me immensely ...
"... you mean these fans?" Posted December 29, 2018 Author Posted December 29, 2018 (edited) Josh or whomever can help me with this problem calc. Josh I tested "Exact" but same results ... Confused. I checked or change the field to text and number ... same. I've attached a test file with a simplified version of the issues, please have a look and advise. I still have to test the whole calc ( nested IF's ) ... so until I solve this issue I could have more. Any assistance here I would be grateful. Thank you. Test_Error.fmp12 Edited December 29, 2018 by Mr. Ignoramus
comment Posted December 29, 2018 Posted December 29, 2018 (edited) Your calculation returns "SW" because the test expression evaluates as False. It evaluates as False because the condition: Exact ( PSBestOptA ; "Same" ) = 0 evaluates as False when PSBestOptA contains the text "Same". This is because the Exact() function returns 1 (True) when the two texts being compared match - and 1 is not equal to 0. You will get the expected result if you change the condition to: Exact ( PSBestOptA ; "Same" ) or simply: PSBestOptA = "Same" (you only need to use the Exact() function if you want the comparison to be case-sensitive). Edited December 29, 2018 by comment
"... you mean these fans?" Posted December 30, 2018 Author Posted December 30, 2018 6 hours ago, comment said: Exact ( PSBestOptA ; "Same" ) = 0 Comment, my apologies ... the stupid test file I created I entered in a "zero" by mistake ... It was suppose to be a "1" and yes the test file works ... I am so tired chasing this problem, the actual file does not work for some stupid reason ... I tried both "equal" and "exact" and they both fail, unfortunately I can not produce the actual file ... I'll have to see if there is somebody local who can take a look at this calculation. Thank you. I will repost with the solution ... what ever it is.
comment Posted December 30, 2018 Posted December 30, 2018 3 hours ago, Mr. Ignoramus said: I tried both "equal" and "exact" and they both fail, unfortunately I can not produce the actual file ... So make a file that reproduces only this problem, and reproduces it exactly.
"... you mean these fans?" Posted December 31, 2018 Author Posted December 31, 2018 (edited) For what it's worth, My apologies ... comment, Josh, LaRetta, the test file was my best efforts and it failed, and when I noticed the error I made on the test file, my laptop almost went out the window ... I was !@#$, so now what do I do ? The calculation was working, completely lost even in communication. Well, the error turned out to be human ( illogical ) ... not computer ( logical ). This is were all my problems with FileMaker reside. Illogical, not Logical ... Logical is easy to test ... 2 + 2 = 4 right ... The customer wanted Two results ... 1st - Provide the best possible number out ( business cards ) from certain materials in thier material list ( stock ). 2nd - From this best possbile number out "List", which one was the best price ( cheapest ). I forgot that for the "Max" function and the "Min" function to work correctly ( meaning my understanding which could be wrong ) was that you needed to be on the 1st record of the found set ( the relationship ). I had to loop though the initial found set ( relationship ) to calculate the "Best Out" and set the "Price" on each record ( material ) then I went to the 1st record to set the "Best Out" and "Best Price" ( Max / Min ). Since I didn't need to know the primary key at the time I calculated best out and best price I coninuted on with the script, and when needed, I looked at the record where I was physically on the 1st record ... Oops ! What was so confusing, the calculation worked ( Test File ) when there was only one record in the found set but when there was more than one and I needed to be on record id lets say "pk_16" I was perfroming all my calculation based on pk_1. So I am sorry for being human ... the test file forced me to re-examine my thinking and I had to step through the script thinking from a basic foundational building block concept when I realized the error. I am now building a new relationship based on the best out and price to capture the primary key which I will be using to calculate where my current "Error" calculates. LaRetta I meant no disrespect, I highlighted in "Bold" my reality not yours. I am completely exhausted with this error and if I offend you, I apologize. I really try to solve these issues myself before coming here, it is the only way I learn. Reading doesn't work. So by the time I get to the forum ... I am exhausted. Thank you. Edited December 31, 2018 by Mr. Ignoramus 1
Josh Ormond Posted January 3, 2019 Posted January 3, 2019 It sounds like you have gotten your issue sorted out. Glad to hear that. Hopefully the whole discussion helped lead you there.
Recommended Posts
This topic is 2169 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now