Re: Validate data from fields of one table with the data from another table and apply condition (285 Views)
Reply
Trusted Contributor
SanjeevDas
Posts: 387
Registered: ‎06-17-2013
Message 1 of 6 (340 Views)
Accepted Solution

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

Honored Contributor
Vadim Gorda
Posts: 5,861
Registered: ‎11-10-2008
Message 2 of 6 (308 Views)

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
SanjeevDas
Posts: 387
Registered: ‎06-17-2013
Message 3 of 6 (302 Views)

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

 

Honored Contributor
Vadim Gorda
Posts: 5,861
Registered: ‎11-10-2008
Message 4 of 6 (295 Views)

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
SanjeevDas
Posts: 387
Registered: ‎06-17-2013
Message 5 of 6 (287 Views)

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
Vadim Gorda
Posts: 5,861
Registered: ‎11-10-2008
Message 6 of 6 (285 Views)

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

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.