Service Manager / Service Center Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Validate data from fields of one table with the data from another table and apply condition

SOLVED
Go to Solution
Trusted Contributor

Validate data from fields of one table with the data from another table and apply condition

Hi Experts,

 

I have a table itcchgautoassignment with which the itc.chgautoassignment form is associated. The form has fields like division, category, subcategory, type, subtype, Workflow and Change Coordinator.

Depending on the combination (Division, Category, Subcategory, type and subtype) , the workflow and the assignment is defined in the form and is saved in the database. Good so far.

 

Now the logic is, whenever an user raises a new change, by selecting the combination of (Division,Category,Subcategory,type and subtype) , the combination selected in cm3r would search for the combination in  itcchgautoassignment, and if it matches then the defined workflow will trigger and the  Change coordinator group will also be assigned automatically.

 

Any guess on how do I acheive this? Or any better plans if you guys can come up with. Would really appreciate it.

 

Thanks,

Sanjeev

5 REPLIES
Honored Contributor [Founder]

Re: Validate data from fields of one table with the data from another table and apply condition

Hello,

you can look at the example based on the format control Subroutines tab Validity settings (it is exactly setting for existant set of Category, Subcategory a d area).

You can do it that way.


Or you can just write a queries for that. or JS  ....

Trusted Contributor

Re: Validate data from fields of one table with the data from another table and apply condition

Hi Vadim,

 

The itcchgautoassignment table has four attributes itc.category, itc.subcat, itc.level4cat,itc.id and based on the four attributes the itc.assignment for the same table is defined.

 

Now, the cm3r will validate the data from those four columns from the above mentioned table and will assign the assignment group automatically from the above table to cm3r.

 

I was able to autoassign the group based on category. Let me explain what I have done.

 

Edited the cm3r format control.

Queries>

Add: true

Edit: true

Delete: true

Filename: itcchgautoassignment

Query: itc.category = category in $file

 

Calculations>

add: true

calculation: assign.dept in $file=itc.assignment in $file9

 

How do I make the autoassignment work combining the four attributes as mentioned in format control?

 

Any help will be appreciated.

Regards,

Sanjeev

 

Highlighted
Honored Contributor [Founder]

Re: Validate data from fields of one table with the data from another table and apply condition

in the add column instead of true set

itc.subcat in $file9=subcategory_field_name in $file and itc.level4cat in $file9=field_name in $file and itc.id in $file9=field_name in $file

 

this will make sure that rest three fields are same in your current record and your "template"

 

Trusted Contributor

Re: Validate data from fields of one table with the data from another table and apply condition

Hi Vadim,

 

 

Thanks a lot. It worked.

 

Regards,

Sanjeev

Honored Contributor [Founder]

Re: Validate data from fields of one table with the data from another table and apply condition