cancel
Showing results for 
Search instead for 
Did you mean: 

Guard condition

Former Member
0 Kudos

Hi,

can anybody tell where I can find examples using the guard condition?

I've a 'Variables Form' and a 'BI Query' and I want to crontol if the user types correctly the values for the variables of the query.

Thanks in advance.

Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

anja_engelhardt2
Active Contributor
0 Kudos

Hi,

what kind of control are you looking for? Do you like to control the format of the entered variable?

Anja

Former Member
0 Kudos

Hi Anja,

I need to control the format of the entered variable and if it is empty or not.

Thanks for your interest.

anja_engelhardt2
Active Contributor
0 Kudos

Hi,

use the function symbol (Fx) for guard condition. There in you can choose like for all other expressions:

!= null means not empty

for example. Format is much more difficult - it depends on your needs.

Anja

Former Member
0 Kudos

Thank you Anja for your answer.

I'd like to control, for example, the format of the 0FISCPER variable. This format is something like this: 0062011 (MMMYYYY).

But what I really don't know or don't understand is, how can I pop a message for user when he/she makes a mistake. For example, if the user types 201105 in the OFISCPER variable?

Where must I put the necessary code for controlling the input fields?

Regards.

anja_engelhardt2
Active Contributor
0 Kudos

I see... This can't be done by guard condition directly. Guard condition doesn't popup in runtime. You need to model it by creating a popup on your own and checking the entries the user did until they are in the correct format.

Anja

Former Member
0 Kudos

Please Ania, can you tell me where I can find pratical example of 'variable form'`+ 'popup'?

Thanks.

Regards.

talia_gurevich
Participant
0 Kudos

Hello David,

You should use Validation on the fields and define there the needed validation rules

that will check whether if the user types correctly the values for the variables of the query.

You can find the Validation in the Configure Input fileld panel.

Regards,

Talia

Former Member
0 Kudos

Hi Talia,

I understand what you say but, once I've defined the validation rules how can I show a message warning that the entered value is not correct (depending of the validation rule).

Can I do this with a popup iview?

Thanks a lot.

anja_engelhardt2
Active Contributor
0 Kudos

Hi,

yes, that's what I tried to tell you. The guard condition doesn't automatically raise some popup. You have to create it manually in your model. There is no detailed documented scenario that shows exactly your needs. About popups take a look at the help pages:

http://help.sap.com/saphelp_nwce72/helpdata/en/48/16c803cadb3d1be10000000a42189d/frameset.htm

Anja

talia_gurevich
Participant
0 Kudos

Hi David,

When you define the Validation for the field, you can define the error message as well. So it will popup automatically if the value does not pass the Validation rule.

Regards,

Talia