Default value as NONE for Catalog Item Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 08:46 AM
Hi Experts,
I have Multi Row Variable set which has one variable as 'group' which is referencing to sys_user_group table, now i want to display "None " as default value. I have a created a None as record in sys_user_group table, can u suggest is this the best approach or through any approach we can achieve this?
Creating a record is not good idea i think because when we promote this change prod, we can't go and create None as record in prod, so please do suggest can we achieve this via Catalog Client Script?
Regards,
G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 09:40 AM
Hello Gayathri,
You are right, it's not a good idea to create a record named None in the group table.
In such scenarios, it always helps if you put a question to the client to understand what is the business case to have None selected in a group field. Are they trying to enforce a selection from the users? If that is the case you can simply make the field mandatory
My opinion is you are better off leaving the field empty - it is as good as None.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2022 10:21 AM
Default behaviour for a reference field is that it stays empty until you choose a record. And when you have chosen a record you can delete it to become empty again. As AnirudhKumar describes, play with the mandatory option if it is mandatory and always guide your users with explanatory text if something specific is needed.
