Bekah Posted October 20, 2004 Posted October 20, 2004 I have a file which uses a script to write ids to a list like 07437 09325 04462 this works fine. but sometimes i need to remove one of them. I figured out how to grab the id as script parameter. but I don't know what to do from there. I tried using the script line and 'reversng it' using minus (-) but that didn't work. - carriage return I even tried using exact to find it. In calculation I can identify it using exact but I can't use it in script to remove the exact line. Any help please?
transpower Posted October 20, 2004 Posted October 20, 2004 See the post "Portal Selection where Selected Items are Removed."
Bekah Posted October 20, 2004 Author Posted October 20, 2004 Hi transpower. Thank you. I entered exactly what you said (copied to clipboard) into search "subject and body" and entered 8 months all forums. The results came up with today's posts. i have used search before so don't know what I did wrong. I repeated it three times. Well, another day at work. I'll go. but no one better talk to me today. I feel grumpy at them. I will try to check here again at lunch. Thank you.
Ender Posted October 20, 2004 Posted October 20, 2004 I have a file which uses a script to write ids to a list like 07437 09325 04462 What kind of list are you talking about? A portal or a text field with IDs separated by carriage returns?
Bekah Posted October 20, 2004 Author Posted October 20, 2004 Thank you Ender. Sorry I was uclear. Each of these codes are in the same field and have an invisible carriage return between them. script writes as Set Field gMultiID; gMultiID & CR & ID It gets them in the field just fine. But later sometimes a person wants to remove only one from the list - and it may not be at the end of the list. it could be anywhere. script parameter grabs it when they click Remove, so the ID is now there. i don't know how to remove the script perameter ID from the middle of the list (or the end for that matter.) Do I need to then place that ID in another global to work with (and compare to the list) or can script parameter do it all by itself? If you need anything more I will check back as soon as I can. thank you for helping me.
Ender Posted October 20, 2004 Posted October 20, 2004 If you know the position of the value that you want to remove (like remove the first value, or remove the second value,) you can do this with the new value functions, LeftValues(), RightValues(), MiddleValues(). But if the ID you want to remove could be any of the values, then I think the best way is to use one of the Custom Functions described on that other thread: http://www.fmforums.com/threads/showflat.php?Cat=0&Number=128500
MoonShadow Posted October 21, 2004 Posted October 21, 2004 Another simpler option - particularly if one doesn't have access to Custom Functions. And it also works in versions prior to FM7. FM7 version: LeftWords(Substitute(
Ender Posted October 21, 2004 Posted October 21, 2004 I knew there was a way, but searching for the first value and last value was bothering me. I see Ray's method simplifies this with a leading and trailing paragraph return in the multiline. Very nice.
MoonShadow Posted October 21, 2004 Posted October 21, 2004 Hi Mike, Ray has a demo in which this is turned into a toggle. Click to add, click again to remove (for multilines). I've been using it for quite some time to add and remove items in a list (or add to relationships for portal, etc.). The demo is vs. 6 Record Selector and I find it as valuable as ever...
Bekah Posted October 21, 2004 Author Posted October 21, 2004 Wow Moon. That worked thank you and I'll check that link file tomorrow also. And thank you Ender for the custom thing. It seems good for when I'm know more about this stuff. It made my head hurt. i didn't understand Moon's script formula either but at least it was small and easy. Does either of you understand how to make a window stay on top? I had another question here that I'm still stuck on. I'll save my rep (maybe) by giving them this way-cool way to omit items from list but they still laugh at me (and cuss) my address window.
Recommended Posts
This topic is 7341 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