Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In our manufacturing system under sales orders it records the customer sales reps in a single field separated by ~.
We want to add a selection so that the user can select a single sales rep and return the orders that they are on. I have tried using subfield(salesreplist,'~') but this is not working 100%. Does anyone know the best way to split this field into a single list?
Why it is not working 100%? Could you give some sample data and what you expect?
Hi,
If you mean you are using it as an expression into a listbox, I'd rather create the field in the script, even using SubField() with a third parameter as the value in the script you would like to extract, i. e:
=SubField('John~Peter~Mike', '~', 3)
Should return "Mike"
Hope that helps.
Miguel
Hi
I would create a table in the load script containing the sales order # and rep name, using subfield in the way you attempted
LOAD salesorderID as [Order ID],
SubField(salesreplist, '~') As [Sales Rep]
Resident SALESORDER;
Then Sales Rep is linked to the sales orders for that rep.
Regards
Jonathan
It seems that is was just having issues when I was calculating it in a list box. I moved the expression to the script and it seems to work fine.
The issue was that it was returning orders without the currernt selection and other things.