Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
jsuijker

Senior Member
Registered:
Posts: 93
Reply with quote  #1 
I have a grid in which i have a column stating "enabled". In this column i store the values 1 and 0, where 1 = Yes and 0 = No.
Now i want to use a dropdown in the grid where you can choose the text instead of the Nr's. Like a Business Object with pair values.
Can anyone give me an example on how to do this with an expression?

And can someone explain why a query business object with the following query does not return the nr's as values when using the BO in the dropdown:
 

select 1 as Yes, 0 as No

0
jpesout

Avatar / Picture

Veteran
Registered:
Posts: 107
Reply with quote  #2 
You need to return 2 rows (1 for each option) and 2 columns (name and value)
select 1 AS Value, 'Yes' AS Name

union
select 0 as Value, 'No' AS Name

0
jsuijker

Senior Member
Registered:
Posts: 93
Reply with quote  #3 

I tried your solution and now Metastorm only let's me choose Value and Name for both options in a value pair

0
jpesout

Avatar / Picture

Veteran
Registered:
Posts: 107
Reply with quote  #4 
I swap the name and value (in order to work in SQL Statement), e.g.
select 'Yes' AS Name, 1 AS Value 

union
select 'No' AS Name, 0 AS Value

It works to me in SQL Statement and BO too.
This expression also works:
ListItems(Pair("Yes",1),Pair("No",0))





0
jsuijker

Senior Member
Registered:
Posts: 93
Reply with quote  #5 

Thnx jpesout. The ListItems works like a charm

0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #6 
We have a number of these in our examples. So much so that we have a couple of functions in our library that returns this list and another with Y & N as the value:

http://processmapping.com.au/freestuff/freemetastormbpm9solutions/index.html

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!