harvey7777 Posted August 14, 2008 Posted August 14, 2008 (edited) I created a list of ID's. As the script processes it removes a value then repeats the process til there are no values. During the process 3 values near the end, change their ID values to entirely different number. see attached.I show the step on which the problem occurs and the beginning list and a list in process. 205 135 100 change to 1205 1100 and 135 disappears. I am using variables and wondered if the problem is related to that.. I have varied the script step several ways and the problem still occurs. It also occcurs in other records so it is not the data. It occurs when there over 39 records. Less records being processed there is no problem. It appears that it may be occurring in the same spot in the list. From the list below you can see I am not even processing those numbers. The next number up for processing is 73. I would appreciate your help. Thanks Edited August 14, 2008 by Guest
IdealData Posted August 14, 2008 Posted August 14, 2008 If you suspect it is a variables issue then switch to using a global field and test that way. Certainly your evidence points towards a bug, but have you also updated to the latest version. It could also be a corrupted file or script. I have seen corrupted scripts, but I corrected by creating a new one and then copy/paste the steps from the original.
LaRetta Posted August 14, 2008 Posted August 14, 2008 (edited) I would not suspect a bug nor corruption here. Why are you using ValueCount() instead of WordCount()? I have no idea what you are doing here or why. UPDATE: To clarify ... if you had carriage returns between the values instead of spaces, your data viewer should show squares. We need to see the values being set by the script, not evaluated. UPDATE2: To see if it breaks using xValues, use Show Custom Dialog in the script. Enter RightValues ( $crewlist ; 1). SURPRISE!! Your script is not putting carriage returns thus you shouldn't be using xValues. That is why I asked to see your entire script here... UPDATE3: You can also see it by creating a calculation. Turn your list into a global variable and then create a calculation showing the results (via the calc you listed above). It does NOT remove the left 'value' because there is no left value. Edited August 14, 2008 by Guest Added several updates
comment Posted August 14, 2008 Posted August 14, 2008 (edited) I think it's pretty clear what's happening here. Let's take a list of values: 65¶ 0¶ 165¶ 205 Substitute ( listOfValues ; LeftValues ( listOfValues ; 1 ) ; "" ) is actually: Substitute ( listOfValues ; "65¶" ; "" ) The problem is that the third value "165¶" also contains the same pattern "65¶". So the substitution takes them out too, leaving: 0¶ 1205 See here for an example of safely removing all occurrences of a value from a list* http://www.fmforums.com/forum/showpost.php?post/299785/ if you had carriage returns between the values instead of spaces, your data viewer should show squares. No, not on my Mac at any rate. --- (*) If that's the purpose here - otherwise RightValues ( listOfValues ; ValueCount ( listOfValues ) - 1 ) should do the job. Edited August 14, 2008 by Guest
LaRetta Posted August 14, 2008 Posted August 14, 2008 WOW! Well Harvey7777 doesn't show the OS they are using. But this is quite a surprise to me! Thank you! So my entire theory that there are no carriage returns is incorrect. Please ignore my post then. But that's why I asked to see where the script SETS the variable. If it doesn't show the squares, how do you know for sure whether it is a space or a carriage return?
comment Posted August 14, 2008 Posted August 14, 2008 Harvey7777 doesn't show the OS they are using. True, and he should get a slap on the wrist from a moderator. But the screenshot leaves no doubt. If it doesn't show the squares, how do you know for sure whether it is a space or a carriage return? I don't - at least not in Watch mode. It's one of the things that make data viewer annoying, and I don't use it often. Anther is not being able to resize the panes (expression vs. result) in Edit mode.
LaRetta Posted August 14, 2008 Posted August 14, 2008 (edited) Uhm, errr, harvey7777, please update your OS in your profile. To do so, go to My Profile > Control Panel > FileMaker Questions (at the bottom). ...but the screenshot leaves no doubt. Oh! So it does! Of course I didn't know Mac didn't display the squares so it wouldn't have made a difference in my response even if I HAD known the OS (in that moment). But you can bet I won't get caught on THIS one again! ...not in watch mode Wow. Neither does mine! I watch in Current mode. Now that makes no sense that it would display differently - that could be very confusing! Does your Mac not display the squares in Current mode either? I plan on reporting this inconsistency ... it should display the same in both. Oh ... and I can resize the panes. Edited August 14, 2008 by Guest
comment Posted August 14, 2008 Posted August 14, 2008 Current mode is no better (see screenshot). I can resize the panes. Are you sure? I am talking about panes in Edit, not columns in Watch/Current.
LaRetta Posted August 14, 2008 Posted August 14, 2008 That is unacceptable and sloppy programming on FileMaker's part. On Watch tab, it looks like there are spaces and on Current tab it looks like there is only one value. FM should switch to using pilcrow and having it display on both platforms on both tabs! I see what you mean on Expression vs. Result now, yes I misunderstood. Although I can resize Expression by changing the window size, the result remains TOO SMALL and it should be resizeable!
harvey7777 Posted August 15, 2008 Author Posted August 15, 2008 I found what I was looking for thanks to Ray Cologan. This is the formula he shared with me. RightValues($CrewList; ValueCount($CrewList) - 1) Thanks for all the replies harvey7777
harvey7777 Posted August 15, 2008 Author Posted August 15, 2008 Correction my apologies to Ray. His last name is Cologon
comment Posted August 15, 2008 Posted August 15, 2008 Perhaps you should have read the replies you have received in this thread. Give my regards to Ray.
Recommended Posts
This topic is 5945 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