Panatrack ParseData Function

Panatrack ParseData Function

This is the source for the [Panatrack_ParseData].
  1. /****** Object: UserDefinedFunction [dbo].[Panatrack_ParseData] Script Date: 8/8/2022 1:51:50 PM ******/
  2. SET ANSI_NULLS ON
  3. GO

  4. SET QUOTED_IDENTIFIER ON
  5. GO

  6. CREATE FUNCTION [dbo].[Panatrack_ParseData]
  7. (
  8. @Input VARCHAR(8000),
  9. @TagName VARCHAR(30)
  10. )
  11. RETURNS VARCHAR(8000)
  12. AS BEGIN

  13. DECLARE @dataStartPos INT
  14. DECLARE @dataEndPos INT
  15. DECLARE @dataLength INT
  16. DECLARE @result VARCHAR(1000)

  17. DECLARE @startTag VARCHAR(30)
  18. DECLARE @endTag VARCHAR(30)

  19. SET @startTag = '[' + @TagName + ']'
  20. SET @endTag = '[/' + @TagName + ']'

  21. SET @dataStartPos = CHARINDEX(@startTag, @Input)
  22. SET @dataLength = CHARINDEX(@endTag, @Input) - (@dataStartPos + LEN(@startTag))
  23. IF @dataStartPos = 0
  24. SET @result = ''
  25. ELSE
  26. BEGIN
  27. SET @result = SUBSTRING(@Input, (@dataStartPos + LEN(@startTag)), @dataLength)
  28. END

  29. RETURN @result
  30. END
  31. GO
    • Related Articles

    • Using Panatrack Flex Fields within eConnect

      When PanatrackerGP submits eConnect transactions, we pass along our flex fields in the event they can be used to update custom data within your GP system. This stored procedure provides a function that can be used to easily pull out a named flex ...
    • Implementing Panatrack - Overview

      This guide outlines the PanatrackerGP implementation process from planning through go-live. Planning Successful implementation starts with thorough planning: Project Setup — Panatrack creates a project and assigns a project lead, importing standard ...
    • Panatrack Support Policy

      Support Hours Panatrack offers phone and email support during regular business hours: Days — Monday through Friday Hours — 8:00 AM to 5:00 PM Central Time Holidays — Closed on United States holidays After-Hours — Planned installations, upgrades, or ...
    • Panatrack Ship Pack tables

      The Panatracker solution includes tables that integrate with Starship to provide information about sales order shipments. Information for shipping containers is captured in one of two Panatracker transactions: Fulfill Order and Verify Order. Either ...
    • Implementing Panatrack - The Kick Off

      Every PanatrackerGP implementation begins with a kick-off meeting after Panatrack receives the down payment. Meeting Agenda The kick-off meeting covers: Introduction to Panatrack team members Implementation process overview Go-live date expectations ...