spMFSynchronizeLookupColumnChange

Signature

EXEC dbo.spMFSynchronizeLookupColumnChange
    @TableName = N'MFCustomer',
    @ProcessBatch_ID = NULL OUTPUT,
    @Debug = 0;

Returns

INT: 1 on success; -1 on error.

Parameters

@TableName
  • Type: NVARCHAR(128)

  • Required: No (default = NULL)

  • Description: Valid class table name (e.g., ‘MFCustomer’). NULL to include all class tables.

@ProcessBatch_ID
  • Type: INT

  • Required: No (OUTPUT)

  • Description: References the ID of the ProcessBatch logging table.

@Debug
  • Type: SMALLINT

  • Required: No (default = 0)

  • Description: Debug level. - 1 = Standard Debug Mode

Purpose

The purpose of this procedure is to synchronize ValueListItems name change in M-Files into the reference table

Additional Info

The valuelist items that has changed and have not yet been updated is indicated by the IsNameUpdate column in the MFValuelistItem table.

Set @TableName to null to include all Class tables with the changed names of valuelistitems

When a name change has taken place on a valuelist item in M-Files then it this procedure will automatically be triggered on the next spMFDropandUpdateMetadata to update all the related class tables.

When valuelist items are changed from SQL to M-Files then this procedure must be called separately to update the class tables

Examples

DECLARE @ProcessBatch_ID INT;
EXEC dbo.spMFSynchronizeLookupColumnChange
  @TableName = NULL,
  @ProcessBatch_ID = @ProcessBatch_ID OUTPUT,
  @Debug = 0;

Changelog

Date

Author

Description

2019-06-10

LC

Fix bug with updating multi lookup values

2018-03-01

DEV2

Create procedure