cancel
Showing results for 
Search instead for 
Did you mean: 

Create Y/N Variable Flag

CdnConnection
Active Contributor
0 Kudos

Experts,

    I have need to create a Variable that returns either Y or N so it can used as a Flag to turn on/off things using Input Control.  The problem this is variable in NOT tied to any Objects in the Data Provider, it needs to be self stained.  Also like creating your on own data values for a table.

Any suggestion,

Ajay

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Ajay,

I know that's an old question, but maybe this could helps another users.

Create a WebI Variable with this formula:

=If (RowIndex()=1) Then "Y" ElseIf (RowIndex()=2) Then "N"

This formula allow users to create any custom values and use them on reports. Just replace the =? values for the array sequence and the "" for custom value.


Regards.

Former Member
0 Kudos

May I ask you what's the purpose of it ?

Regards,

Rogerio

CdnConnection
Active Contributor
0 Kudos

Rogerio,

     I want to use the variables from the Filter panel (max workspace) to turn off/on certain levels/portions of the reports.  I also want to use another variable to change tables/crosstabs to charts.  I have been able to get this to work fine when I create objects within the Universe but I have problems when I start using other datasources not from Universe.

This is why I need to create variables in WebI not associated to any objects from the Universe.

Regards

Ajay

Former Member
0 Kudos

Hi,

do you have access to Custom SQL ?

If so, try this.

If you have just one query, Query 1 :

1 - Drop any text object into the query results panel, edit the SQL and substitute the object name by 'Y';

2 - Execute the query ;

3 - Duplicate Query 1 into Query 2;

4 - Edit Query 2 SQL and change 'Y' by 'N';

5 - Execute both queries and merge it on all dimensions

Let me know if it helped you,

Regards,

Rogerio

CdnConnection
Active Contributor
0 Kudos

Rogerio,

      I need it with NO Datasource dependencies.   That's why I am such a challenge.  I MUST use only WebI functionality, NO Universe, NO Custom SQL, NO Datasources of any kind.

Ajay

Former Member
0 Kudos

What is the greater grain of information on you report ?

Regards,

Rogerio

vijaymuniraj
Active Participant
0 Kudos

Ajay,

I had this same requirement in different aspect but not able to find a solution. I don't think it is possible with current feature of webi report.

Thanks

former_member183330
Active Participant
0 Kudos

Hi Ajay,

As Harshad and Vijay Muniraj said create A dummy variable, this would not be related to your data, but

based on the selection of input control you can write a logic to what you want show, even in table or

chart properties also you can use show/hide option as requested. With current features of webi I hope

you can achieve.

Please post your problem with screen shots it would be easier to understand your scenario.

Regards,

Sampath Kumar G

vijaymuniraj
Active Participant
0 Kudos

Ajay,

see if below meets your requirement.

1. Create one measure variable with empty value.

2. On input control, select check box and assign custom values as "Y" and "N" or as you want.

3. By default, all values will be selected at first time.

Thanks

Vijai Muniraj

CdnConnection
Active Contributor
0 Kudos

Vijay,

    This is still using the work around suggested by other.  This still does NOT resolve the solution I am looking for.

Ajay

Former Member
0 Kudos

Hi Ajay,

I'm assuming that you need this as a dimension object independent of all other objects, is this right ?

If so perhaps this link will help you out

Regards,

Rogerio

CdnConnection
Active Contributor
0 Kudos

Rogerio,

     The link does not help.  I need a Dimension that does NOT associate to any object from the Universe, needs to be a standalone variable.   I did try to create something that would use CurrentDate function but could NOT get TWO or records to work correctly.

Ajay

former_member207052
Active Contributor
0 Kudos

Ajay, Can you brief your requirement with an example ?

CdnConnection
Active Contributor
0 Kudos

If you read the initial question, it's quite clear.

Need to create a variable that return Y or N as the values.  This variable can't be tied to any existing Objects.

Ajay

Former Member
0 Kudos

Ajay,

1) Create a variable v1 with ="Y"

2) Create a input control on v1 and Manually enter value N in list

3) Now create variables wilth if then else  for example

=If [v1]="Y" Then [Your required logic] Elseif[v1]="N" Then [Your required logic]

4) Make variables like above and use them in report to see the change through input controles instead of using orignal objects.

Thanks,

Haseeb

CdnConnection
Active Contributor
0 Kudos

Haseeb,

    I have already done the work around but my need to have your Step#3 actually show two records prior to using Input control.   I need a variable that actually returns TWO records at ALL time.

Ajay

arijit_das
Active Contributor
0 Kudos

1. Create a variable: Flag ="Y"

2. Create a radio button input control on [Flag].

3. In custom list of values, add Y from the list and manually add N.

4. Uncheck Allow selection of all values.

5. Select a default value as Y.

6. Test.

CdnConnection
Active Contributor
0 Kudos

Arijit,

     I am already using this work around to do partial work, I want something that actually show TWO records.  I want to user the TWO records to do more extensive show/hide of Dimensions, Sections, change fonts and others customization based on the values.

Thanks Kindly,

Ajay