Is it possible to create dictionaries dynamically?

dianemiro
Kilo Sage

Hello Everyone,

 

We have a requirement to allow users to create additional dictionaries on a Custom table. They will be able to set the type to one of the following: Integer, Select box, Date, DateTime, Multiline, Single Line of text. Then based on that, a field will be created. With this ask, I have a few questions:

 

1. Is it possible for users to create dictionaries themselves on a custom table via script?

2. There is also an ask to only use 1 field value instead of multiple fields, is this possible as well?

 

Thank you!

 

Regards,

Diane Miro

1 ACCEPTED SOLUTION

shloke04
Kilo Patron

Hi @dianemiro 

My suggestion here would be not to allow users to play around creating fields in any table unless they have proper knowledge of the platform. If someone keeps creating fields and those are not relevant it might end up in a mess.

 

So please be careful before allowing this. Technically yes this is possible, any user who has any of below two roles are allowed to create:

1. admin

2. personalize_dictionary

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

4 REPLIES 4

Sai Kumar B
Mega Sage
Mega Sage

@dianemiro 

1.) Yes, you can create dictionary records using script

2.) It depends on your requirement, Are you using the custom table to store any external data? If you want to store all the data in one field you can create one field with more length else create multiple fields and store values accordingly.

 

 

Hello Sai,

 

Yes we are using the custom table to store external data. They would want to only have 1 field value to use as storage of the data and its dictionary type will depend if they chose Integer, Select box, Date, DateTime, Multiline, Single Line of text. Is this possible?

 

Regards,

Diane Miro

@dianemiro 

No, that's not possible. Once you create a field, changing that dictionary type will lead to data issues. So, store the response in one field. You can create a script type field if your response is in JSON format, or you can create a string type field with a max length.

 

shloke04
Kilo Patron

Hi @dianemiro 

My suggestion here would be not to allow users to play around creating fields in any table unless they have proper knowledge of the platform. If someone keeps creating fields and those are not relevant it might end up in a mess.

 

So please be careful before allowing this. Technically yes this is possible, any user who has any of below two roles are allowed to create:

1. admin

2. personalize_dictionary

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke