macavity Posted December 23, 2003 Posted December 23, 2003 The value list in question derives from a field in another file, and the values in those fields will be frequently edited: more records will be added, others will be deleted, and some will be altered. The problem is that the text field created when a value is selected from the list continues to contain values that no longer appear in the value list itself. That precludes counting carriage returns in the list, which seemed like a good idea, till I thought about it. So is there another way to count the number of items checked in a value list? Oh. And a related question. I also want to ascertain whether a value selected from the same value list but via a pop-up window is identical to one of the selected items in the check-box field with the same value list. That works fine using the "pattern" function - but again it will find congruence between the chosen pop-up item and a value that had previously been entered into the check-box list but has since been deleted or altered and is no longer in the current check-box list. If there were some way to edit the text field (automatically) so that it would always reflect the current contents of the check-box list - that would solve all my problems... I hope someone is able to follow this confusion and can offer any suggestions. Thanks for any and all help.
macavity Posted December 24, 2003 Author Posted December 24, 2003 Forget it. I realize now it can't be done. (at least I don't think it can...) sorry to have bothered you. I've decided to use two portals instead - which presents different if less serious problems. Please see my portal question.
-Queue- Posted December 24, 2003 Posted December 24, 2003 Okay, it sounds as if you're wanting to have your text fields updated whenever a value list item is changed or deleted. Here's how I would do it, off the top of my head. Force users to go to a special layout where modification of the field the value list is based. Set a global with the current contents of the text. If the record is deleted or changed (via a scripted 'Delete' or 'Edit' button), Set the global to a global in your main file and the changed data (or "", for deleted ones) to another global in the main file. Perform an external script in the main file that finds all records with the global's contents in the specific text field. Then loop to replace all instances of the global in the resultant records with the secondary global. You should then have an updated set so that your PatternCount( ) is valid.
macavity Posted December 25, 2003 Author Posted December 25, 2003 Thanks Queue. That would work. In the end, though, I opted for a portal and added a simple text field and a series of scripts to enter the contents into the text field and delete the dross. Since the values are from related fields and only a few will be visible in each record in the main file, a portal seemed OK. But for a longer value list your idea would be better!
Recommended Posts
This topic is 7640 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