Joined: 11 Sep 2015
Location: United States
Online Status: Offline
Posts: 15
Topic: String Help Posted: 21 Mar 2020 at 4:52am
I am trying to separate a string into its individual parts and somewhere I am missing a step.
Problem:
I have a text field 'Contract Number' which is actually 'Contract Number' - 'Description' and I need to remove the dash and Description from the text string.
Limitations:
I cannot key off the dash because the contract number may also contain a dash or more than one dash.
I cannot Trim Left because the contract number may be a variety of lengths depending on the contract.
I can access the Description field separately. I have tried comparing and removing the Description field, I tried counting the characters in the Description and then trimming. Somewhere I am missing something.
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 23 Mar 2020 at 4:35am
So the question is, are there any dashes in the comments? If not. you could use inStrRev to find the first dash. Otherwise I am not sure how you would find it unless you do some sophisticated parsing of the data (i.e., if there is a number after the dash ignore it, but if there is a space then flag it).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum