Splitting the string and taking the number of substrings

AmaraaAmaraa Member Posts: 153
Hello,

What I am trying to do is this:
I have a table with 4 -> (1, 2, 3, 4) columns and the primary key will be 1, 2, 3.
1 = customer
2 = dimension value (can be combination of dimension values)
3 = min amount.
and if one dimension value is entered with the combination or by itself it cannot be repeated with other combination. but the exact same combination or itself (dimension value) is entered then the min amount (3) should be different for the customer.
Dimension combinations ab = ba. So if "ab" is entered there can't be "ba".

So, I'm thinking the column 2 will be string contains from dimension values the delimiters. and when I look up this column of field there will be 1 temp table with the list of dimension values. So, I need to know how many dimension values in that string.

How can I do that? Splitting the string and taking back the number of substrings in that string. :?:

Any help appreciated,
Amaraa

p.s: I thought the detailed explanation will be helpful to understand the case

Comments

  • matttraxmatttrax Member Posts: 2,309
    If you want to do it this way, take a look at Table 6508 - Value Entry Relation. Codeunit 6500, function DecomposeRowId works with the Source RowId field from the table.

    That should get you started on the right path to understanding how to manipulate strings. You can also lookup string functions from C/SIDE Help in the client.
Sign In or Register to comment.