Make one Reference Field Dependent on Another in Same Custom Table

jmiskey
Kilo Sage

In creating Service Portal pages, we sometimes like to have Multiple Choice fields where users can select more than one option.  Typically, you would use a List Collector to do this, but List Collectors typically run off of tables, not off of defined choice lists.

So we would create a custom table that we could use for this purpose.  So we created Custom Table.  Among the fields we are creating in this table include Catalog Item and Variable Name, so we can use these to filter on.

So, this Catalog Item field is a Reference field to the sc_req_item table, and this Variable Name field is a Reference field to the item_option_new table.  However, we would like to limit it so the Variable Name field is limited to those record where the Cat Item value matches the Catalog Item field from the first reference field (Variable Name is dependent on Catalog Item).

How can we accomplish this?

1 ACCEPTED SOLUTION

Yes. Still you will need a refernece qualifier.

 

So you have field 1 - where you will select the Catalog Item

on field 2 you should have option to select the variables related to catalog item

 

So in field2, which is a reference to item_option_new  you need a reference qualifier: javascript: 'cat_item='+current.field1


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

4 REPLIES 4

SanjivMeher
Kilo Patron
Kilo Patron

You can add a reference qualifier to the variable.

for ex

javascript: 'cat_item='+current.variables.your req item variable.cat_item


Please mark this response as correct or helpful if it assisted you with your question.

jmiskey
Kilo Sage

I don't think that will work.  Maybe I wasn't too clear (I think I may have confused you with mentioning of the Service Portal).  This is all on the Custom Table level.  The Service Portal has nothing to do with the reference at this point.

I set up this Custom Table, and am talking about populating this Custom Table with records.  The Variables Names that they can choose from should be limited by the Catalog Item they select in populating this table.

Yes. Still you will need a refernece qualifier.

 

So you have field 1 - where you will select the Catalog Item

on field 2 you should have option to select the variables related to catalog item

 

So in field2, which is a reference to item_option_new  you need a reference qualifier: javascript: 'cat_item='+current.field1


Please mark this response as correct or helpful if it assisted you with your question.

Thanks for replying.  Sorry for not getting back to this sooner -- I have been laid up with the flu for a few days.

I tried what you suggested and it does exactly what I want!  

Thank you very much!