cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in exists() function of XI Graphical Mapping Tool?

Former Member
0 Kudos

Hi!

If I connect a source field with the exists() function in XI Graphical Mapping Tool and the tag exists it returns TRUE, otherwise it returns FALSE, so everything works as expected.

But I have to connect a user-defined function with exists(). The user-defined function will either calculate a value or set Resultset.SUPPRESS.

If there is a value the exits() function returns TRUE, however if Resultset.SUPPRESS is set it does also return TRUE! This looks to me like a bug in exists() function. Shouldn't it always return FALSE if the input is Resultset.SUPPRESS?

Regards, Tanja

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi,

Result.SUPPRESS is an another value only and hence exists returns true.

Regards

Suraj

Former Member
0 Kudos

Hi Suraj!

Suppressed values are represented internally by the constant ResultList.SUPPRESS. So I just thought that the exits() function should work the same way if ResultList.SUPPRESS is set by the mapping tool because the tag is not there or if the ResultList.SUPPRESS constant is set manually in a user-defined function.

Regards, Tanja

stefan_grube
Active Contributor
0 Kudos

Hi Tanja,

The exists() function checks, if a queue is empty.

An empty queue is <b>not</b> represented by the SUPPRESS value.

If inside a queue there is a SUPPRESS value, the queue is <b>not</b> empty.

If you want the exist() function after a UDF, provide an empty queue, or easier: return the values "true" or "false" directly from the UDF.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan!

> The exists() function checks, if a queue is empty.

> An empty queue is <b>not</b> represented by the

> SUPPRESS value.

> If inside a queue there is a SUPPRESS value, the

> queue is <b>not</b> empty.

Ok, so it's not a bug and the exists() function is working as expected.

> If you want the exist() function after a UDF, provide

> an empty queue, or easier: return the values "true"

> or "false" directly from the UDF.

Yes, that's how I actually solved the problem. The UDF was used at several places where the ResultList.SUPPRESS output was needed. So I copied the UDF and changed it so that the output was TRUE or FALSE instead.

Regards, Tanja

stefan_grube
Active Contributor
0 Kudos

sorry, that does not work.

Message was edited by: Stefan Grube

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tanja,

ResultList.SUPPRESS denotes absence of a field, So in my opinion it is a bug in XI- Exists() function in Graphical mapping Tool.

Regards,

Ananth