Dependant value is not working on workspace based on specific conditions

Shruti Khaire
Kilo Sage

Hello Community,

 

I have a requirement where we set the field value based on a script and depending on the value set for that field we show up the choices for the next field that is 'Standard' field the whole script works fine on Case form but on CSM configurable workspace it doesn't show any choice for two specific conditions and work well for rest of them.

Has anyone faced this issue before if yes please let me know, I will be grateful for the help provided.

 

Thanks & Regards,

Shruti Khaire

1 ACCEPTED SOLUTION

jorgealmo
Tera Expert

Hi Shruti,

I just went through this same issue. The dependent field would show the values on the regular UI but not on the workspace. The issue was that the dependent value size was larger than the field size and for some reason the workspace was enforcing the size but no the backend. Check that the size of your values in the Dependent field are equal or less than the size of the field. 

I realized it was this when I implemented a client script on change to for add the choices on the field (it worked) and this is when I noticed the truncated value got saved on the dependent field.

View solution in original post

3 REPLIES 3

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Shruti Khaire ,
I trust you are doing great.

I understand the importance of resolving this issue for you. While it's difficult to pinpoint the exact cause without further details, I can provide you with some general troubleshooting steps you can take to investigate and potentially resolve the problem.

  1. Review the script: Double-check the script logic and ensure that it is correctly written to set the field value and display choices based on the desired conditions. Verify that there are no syntax errors or logical flaws in the script.

  2. Check field configurations: Ensure that the field settings and configurations are consistent across both the Case form and the CSM configurable workspace. Pay special attention to the 'Standard' field's configuration and any dependencies it may have.

  3. Debug the script: Add logging statements or debug breakpoints within the script to track the execution flow and verify if the script is being triggered as expected in the CSM workspace. This will help identify any discrepancies or errors in the script execution.

  4. Verify field dependencies: If the 'Standard' field's choices depend on the value set in the previous field, confirm that the dependencies and conditions are properly defined and correctly evaluated in the CSM workspace.

  5. Test with different conditions: Try testing the script with various scenarios and conditions in the CSM workspace to determine if the issue is specific to those two conditions or if it persists across different conditions. This can help narrow down the problem area.

  6. Seek community support: Consult the ServiceNow community forums or any dedicated support channels to check if other users have encountered a similar issue. Share the specific details of your scenario to see if anyone can provide insights or solutions based on their experiences.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Amit Gujarathi
Giga Sage
Giga Sage

HI @Shruti Khaire ,
I trust you are doing great.

While it's difficult to pinpoint the exact cause without further information, I can suggest a few steps to investigate and potentially resolve the issue:

  1. Check the script: Review the script that sets the field value and verifies if it is compatible with the CSM configurable workspace. Ensure that the script is not dependent on any specific functionality available only on the Case form.

  2. Verify field configurations: Double-check the configurations of the 'Standard' field in the CSM configurable workspace. Ensure that the field is properly configured to display choices based on the value set in the previous field. Make sure there are no conflicting configurations or restrictions causing the issue.

  3. Debug the script: Add logging statements or debug messages to the script to verify if it is executing correctly in the CSM configurable workspace. This will help identify any potential errors or issues within the script.

  4. Compare environments: Compare the configurations and setup between the Case form and the CSM configurable workspace. Identify any differences that might be causing the issue. Pay attention to any customizations or overrides specific to the CSM workspace that might impact the functionality.

  5. Engage ServiceNow community: If the issue persists, reach out to the ServiceNow community, such as the ServiceNow Developer Portal or the ServiceNow Community forums, for assistance. Describe your specific scenario and ask if anyone has encountered a similar issue before. People within the community are often willing to help and provide guidance based on their experiences.


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



jorgealmo
Tera Expert

Hi Shruti,

I just went through this same issue. The dependent field would show the values on the regular UI but not on the workspace. The issue was that the dependent value size was larger than the field size and for some reason the workspace was enforcing the size but no the backend. Check that the size of your values in the Dependent field are equal or less than the size of the field. 

I realized it was this when I implemented a client script on change to for add the choices on the field (it worked) and this is when I noticed the truncated value got saved on the dependent field.