Tableau Connector for API

Build 24.0.9060

api:validate

You can use api:validate to throw an error if a required value is not provided.

Parameters

  • item: The item that contains the attribute to be validated.
  • attr: The attribute to be validated. If the attribute does not exist, an error is thrown.
  • code: The error code to be thrown if validation fails. Default: "api:validate".
  • desc: The error description to be thrown if validation fails. By default a message is thrown that the specified attribute is required.

Examples

Throw a more specific message if the _query item does not contain the Id attribute:

<api:validate attr="_query.Id"   desc="The Id is required to delete."/>

See Also

  • api:throw: Raise an error (exception) from within a script.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060