I need to make IDC smarter - can't get it to capture this one field right

Hi.
We have a new type of invoice, for which I created all new DFD and ECM config.
I have a 2-table DFD which isn’t the issue.
There is one set of values on the invoice where I only need part of what it is capturing. Eg. “BIN E7” always captures that whole text and I just want E7.
No matter what I try I can’t get it to work including misc parameter with FilterContent=BIN.
I had heading “BIN” and exclude text “BIN” and removed those, I had a keyword that is above BIN E7 but doesn’t exclude BIN.
If I can get this to work it will be huge.
Note: It captures Bin Qty correctly but not the Bin number.
image

I would not fight it and just add another field in the DFD to capture the whole field and the use a formula with STRRIGHT(FT_BINFIELD,2) if the bin was always 2 characters. If it varied then you could maybe use STRLEN in a combination or just use STRREPLACE(FT_BINFIELD,“BIN”,“”)

Edit: Removed erroneous colon

1 Like

Thanks Greg. I will give this a try. It is often more than 2 chars. Sometimes like “X123/Y456” or longer.

1 Like

Then I would try replace first.

1 Like

Could also try one of these options:

SUBSTR(FT_BINFIELD,4,10)
FT_BINFIELD = Field being mapped
4 = Number of characters to skip (Ie. "BIN ")
10 = Number of characters to take

SPLITGET(FT_BINFIELD," ",0)
FT_BINFIELD = Field being mapped
" " = Character to split the field at
0 = Zero based point where to take the rest of the string from

1 Like

I actually just tried SUBSTR as I couldn’t get STRREPLACE to work.

It works when I calculate.

It actually doesn’t capture anything, (not populating the field) but if I select the text, then click calculate, it now shows “E7” but with STRREPLACE it didn’t work.

Thanks

@gpayne , just curious. In your STRREPLACE example, why do you have a colon [:] between the first comma and “BIN”?

If the colon is normal IDC functionality for the STRREPLACE function, then I’ll just say that I have used STRREPLACE in a lot of DFD formulas but never with a colon as in your example.

My suggestion to @Barb would be to try STRREPLACE(FT_BINFIELD,“BIN”,“”) [without any colon] as I believe STRREPLACE will be more resilient than SUBSTR.

That would be a typo that I did not notice.

I kept the colon but added # because I’m using it in a table.
Everything is working great now, other than the user has to select the field on the image. It won’t fill in the table fields but that could be a Training it thing.

Do you have calculatable and AutoCalculate set?