cancel
Showing results for 
Search instead for 
Did you mean: 

Basic Graphical Mapping

Former Member
0 Kudos

Hi All,

I am newbie to PI and learning graphical mapping, I understood almost all functions except few basic functions

1) Unable to understand index function, can you please understand with example, gone through wiki's on scn still confused

2) when to use boolean functions, when ever I use "AND" & "OR" functions I get map errors, attaching the graphical map i used for testing, please explain

Thank you

Kishore

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member202642
Participant
0 Kudos

Hi Kishore,

1) Unable to understand index function, can you please understand with example, gone through wiki's on scn still confused:


---->>>>> An Index is like providing an initial value to a data type. Suppose you have a data type as Roll No. of students in a class. Then this has to be start with 1 with an incremental value of 1. By doing this you will get your Roll No. generated.

An as far as context within an index is considered, you can think of it as for  different classes the Roll No. has to be start with 1. It can not have the same value for entire classes. Then in that case you should use context change for every new class.

2) when to use boolean functions, when ever I use "AND" & "OR" functions I get map errors, attaching the graphical map i used for testing, please explain


---->>>      Boolean "AND" & "OR" functions results into true or false. Provided the values you are providing are of same type. Be careful while you map using Boolean "AND" & "OR". Many a times we made a mistake of comparing a Boolean to a "String". Even I had done those silly mistakes. In those cases it will show an error in processing log something like this:


"Cannot  cast boolean to a string ".

You can proceed with your mapping as suggested by Harish. In this case you are first checking whether  CCINS & CCNUM are equal to 10 or not. This will result into a Boolean value of  "True" or "False". These values will be feed to "AND" which is a Boolean function and can accept Boolean inputs.



Former Member
0 Kudos

Hi,

>>when to use Boolean functions, when ever I use "AND" & "OR" functions I get map errors, attaching the graphical map i used for testing, please explain

Boolean functions(AND or OR) accepts only ((true or 1),(false or 0)) and returns either true or false.

AND returns true only if both the inputs are true or 1

OR returns false only if both the inputs are false or 0.

You are getting mapping error because you are passing string value to Boolean function.You need to modify your logic as above said by Harish.

>>Unable to understand index function, can you please understand with example, gone through wiki's on scn still confused

Go through below link .you can definitely understand its usage .

Graphical Mapping -Standard functions - Process Integration - SCN Wiki

Regards

Venkat

Harish
Active Contributor
0 Kudos

Hi Kishore,

Adding to Hareesh's reply. you can modify your map as below

CCNUM -->> Equals (10)

                                        -->> input to AND --> IF without else --> map CCINS to CCNUM

CCINS --> Equals (10)

regards,

Harish

former_member184720
Active Contributor
0 Kudos

Hi Kishore- Please go through the below wiki.. It should answer your queries..

Standard Functions in PI 7.0 - Process Integration - SCN Wiki

when to use boolean functions, when ever I use "AND" & "OR" functions I get map errors, attaching the graphical map i used for testing, please explain


>>> You can use boolean function only for Boolean values.. i.e. your input should be true/false..

Former Member
0 Kudos

Hi,

I have gone through the link already and still did not only index function mapping

tough there is an example, still confused, can you explain it better ?

Thank you

former_member184720
Active Contributor
0 Kudos

I'm not sure what is confusing. It's just like a counter where you can handle initial and incremental values specific to a context.

Refer to below blog if it helps..

New functions in the Graphical Mapping Tool XI ... | SCN