0

function is not defined: removeAllButDigits(String)

I create a bar code. And I get the error: function is not defined: removeAllButDigits(String) at line 1, colum 40 

all formulas are spelled out correctly, the last one remains. Who can tell what the problem is?

5 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    The function you want to use is a self made function/script in the global script definitions of the data base.

    put this in that field to let it work:

    function removeAllButDigits(mixedString : text) do
    let digitString := "";
    for symbol in mixedString do
    if not (symbol < "0" or symbol > "9") then
    digitString := digitString + symbol
    end
    end;
    digitString
    end;

    Steven

    • CCTS
    • 3 yrs ago
    • Reported - view

    Hello Stiven

    Thanks for the hint. I did barcock by example and did not see that there is a global function. but I still can't generate the code

    as I understand it, when entering numbers in the field "String to bar-code" a function is generated in field ''This will be read by scanner" and displayed in field "Preformatted description string (for human eyes)". After our hint, I registered a global function, and the field started working, bur field "Preformatted description string (for human eyes)" does not worck.

    Please chek this formula from this field

    let description := replace('String to bar-code', " ", " ");
    let descriptionLength := length(description);
    let descriptionFont := text('Descriprtion Font');
    let humanEyeString := "";
    for symbolNr in range(0, descriptionLength) do
    let symbolCode := text((select 'Symbols in SVG')[Font.'Font Name' = descriptionFont and Symbol.Symbol = item(description, symbolNr)].Symbol.Symbol);
    if not symbolCode then
    symbolCode := text((select 'Symbols in SVG')[Font.'Font Name' = descriptionFont and Symbol.Description = "Replacement Character"].Symbol.Symbol)
    end;
    humanEyeString := humanEyeString + symbolCode
    end;
    humanEyeString

     

    • CCTS
    • 3 yrs ago
    • Reported - view

    code generation and ASCII Coded String for Barcode Font  fails

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    As I didn't make the '0_SVG_Barcode_GS1-128_Lite database' myself, I can't help you any further. Does the original still creates barcodes? Then you should check this one for missed formula's. You also need all the tables inside because the barcode is generated with that data as I see it...

    Steven

    • CCTS
    • 3 yrs ago
    • Reported - view

    Ok)

     Thanks for u time 

Content aside

  • 3 yrs agoLast active
  • 5Replies
  • 377Views