1. Beatrix Willius
  2. Valentina Database ADK
  3. Tuesday, May 02 2023, 03:29 PM
  4.  Subscribe via email
I have a method for a VarCharField:


MethodText = "if (lower(list_nthitem(MailboxPath, 1, '" + globals.MailboxDivider + "')) = 'inbox' or lower(list_nthitem(MailboxPath, 1, '" + globals.MailboxDivider + "')) = 'sent' or lower(list_nthitem(MailboxPath, 1, '" + globals.MailboxDivider + "')) = 'sent messages', "
MethodText = MethodText + "list_nthitem(MailboxPath, 1, '" + globals.MailboxDivider + "'), list_nthitem(MailboxPath, list_itemcount(MailboxPath, '" + globals.MailboxDivider + "'), '" + globals.MailboxDivider + "'))"

if MailboxTable.CreateVarCharField("MailboxPathName", 1000, EVFlag.fNullable + EVFlag.fIndexed, MethodText) = Nil then
Globals.theErrorLog.LogItem "Error creating MailboxPath Name"
end if


I need to change the method for existing databases. How do I do that?
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Thanks, got it. Was thinking way too complicated as usual.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Sergey Pashkov Accepted Answer
Hello Beatrix,

Using API - using VField.MethodText property

Or SQL:

ALTER TABLE "tblName" MODIFY "MailboxPathName" VARCHAR( 1000 ) METHOD ( ' ... method text ... ' ) INDEXED;
References
  1. https://valentina-db.com/docs/dokuwiki/v13/doku.php?id=valentina:products:adk:api:vfield_class:vfield_properties#vfieldmethodtext
  2. http://www.valentina-db.com/docs/dokuwiki/v13/doku.php?id=valentina:vcomponents:vsql:reference:alter_table#modify_field
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories