Hello,
I have created two fields in the 'Item Card' page, i.e. Item Type & Item Color. Both are option fields.In Item Type field I declared three options:1.Paper, 2.Ink, 3.Chemical & in Item Color I declared 1.White & 2.Red options. I want to add some functionalities on those fields i.e. whenever a user selects 'Ink' option from the Item Type field it prompts the user to select at least one color from the Item Color field.If the user doesn't select any color then it'll show an error msg. I hv write the following code within the 'OnValidate' trigger of Item Type field:
if "Item Type"="Item Type"::Ink then
"Item Color":="Item Color"::Red,White
else
Errror('Please select a color');
But it shows syntax error. Please help me out.
I have created two fields in the 'Item Card' page, i.e. Item Type & Item Color. Both are option fields.In Item Type field I declared three options:1.Paper, 2.Ink, 3.Chemical & in Item Color I declared 1.White & 2.Red options. I want to add some functionalities on those fields i.e. whenever a user selects 'Ink' option from the Item Type field it prompts the user to select at least one color from the Item Color field.If the user doesn't select any color then it'll show an error msg. I hv write the following code within the 'OnValidate' trigger of Item Type field:
if "Item Type"="Item Type"::Ink then
"Item Color":="Item Color"::Red,White
else
Errror('Please select a color');
But it shows syntax error. Please help me out.