Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #1 
Is it possible to run an if statement in a dropdown or am i better off using a visibility/checkbox combo to show the dropdown i need?

Example: Client A should only show Client A choices in the drop down, Client B should only show Client B choices in the dropdown.

Is it possible to do that with one drop down?
0
Nils

Member
Registered:
Posts: 23
Reply with quote  #2 
Why don't you filter the dropdown choices with SQL-Select?
You can even use a BO for that...
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #3 
Never thought of that, i guess i could set a variable on form load based on client number and throw that in the select statement.  I'll toy around with that.  I was trying to do everything inside a single statement but this is easy enough to do.

Thanks!
0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #4 
I agree with Niles ... use a dynamic SelectSQL, though I've also used a C# function which returns a MSTM list type (whether a single value for code/value pair is up to you).  I've used both for different reasons and both work.

In line "if" statements don't seems to work very well.
0
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #5 
So i want to pull a field from a table, the WHERE part is either "ABC" or "" based on client number. 

Current thought is to set a variable in advance to call to in the select...
On Form Load - (If client='12345') variable = "ABC" ELSE variable = ""
In dropdown on form - Select <field> FROM <table> WHERE <field2>=@variable

So is it possible to write that in a single select statement? 
0
jwoodhull

Member
Registered:
Posts: 10
Reply with quote  #6 
Why don't you just set the text for the select sql in the On Form Load?
On Form Load - If(ProcessMBO.Client='12345') {Local.txtSelectQuery = "select <field> from <table> WHERE <field2>=ABC"} else { Local.txtSelectQuery = "select <field> from <table> WHERE <field2>='' "}
in Dropdown, replace "SELECT * from " with Local.txtSelectQuery
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!