cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

update tool macro on meta attribute

llevert
New Contributor

Hello,

I would like to implemente a updatetool macro on varchar meta attribute.

I try do it but my macro doesn't work. 

7 Replies

Thanks for this information Man Wink

<script id="F5_watermark" type="text/javascript"></script>

Update tools are not available on varchar attributes.

I just tried... and it does not seem to work with varchar metaAttributes Smiley Frustrated

I also found a note saying that the AttCtl_Update function was "not yet functional"...

If anybody can tell us more about this Smiley Very Happy 

Hi,

this is my code


'MegaContext(Fields,Types)
'Uses(Components)
Option Explicit

 

' Must be implemented - returns the kind of the control
Function AttCtl_GetDefaultKind() As String
AttCtl_GetDefaultKind="Edit"
End Function

 

 


'May be implemented if the kind of the control depends of the object
'Function AttCtl_GetKind(Context As MegaUpdateToolContext) As String 
'End Function

'May be implemented to initialize or refresh the content of the control - returns False to invoke default implementation
'Function AttCtl_SetText(Context As MegaUpdateToolContext,sInitialValue as String) As Boolean
'End Function

'May be implemented to catch a command  - returns False to invoke default implementation
'Function AttCtl_OnCommand(Context As MegaUpdateToolContext,Item As Integer,Notification As Integer) As Boolean
'End Function

'May be used if the control has a button menu - the macro must implements the MetaCommand Macro methods to fullfill the action
'returns the category of the standard command to be added to the menu
'Function AttCtl_ImplementsMetaCommand(Context As MegaUpdateToolContext) As Integer'
'End Function

'Must be implemented to fill a drop-down list - return the values type
'Function AttCtl_FillCombo(Context As MegaUpdateToolContext,FillCollection as MegaCollection,InitialValue as String) As Integer
'End Function

'May be implemented to overload the update of the object - returns False to invoke default implementation
'Function AttCtl_Update(Context As MegaUpdateToolContext,Status As Integer,ErrorMessage As String) As Boolean
'End Function

'May be implemented to overload the check the validity of the object - returns False to invoke default implementation
'Function AttCtl_CheckUpdate(Context As MegaUpdateToolContext,Status As Integer,ErrorMessage As String) As Boolean
'End Function


Function AttCtl_Update(Context As MegaUpdateToolContext,Status As Integer,ErrorMessage As String) As Boolean
 AttCtl_Update=true
  msgbox "LLT: valeur modifié"


End Function

 

jftrianda
MEGA
MEGA

Hello

do you search for a sample code in the repository ?

Select [MetaAttribute] Where [MetaAttribute Type] ="A" 
		And [MetaAttributeUpdateTool]

Explore the result and you will find an implementation of an update tool (in VB script) on a varchar attribute ("Access path.MetaAttributeUpdateTool""

 

Kind Regards

 

JF

lmazurie
Honored Contributor

Hello llevert

 

Before having more infos about your need,   have you set "_AtNature" to "Virtual" on you MetaAttribute attached to the macro ?

Thanx

Rgds,

 

Lionel M.  

Lionel Mazurié

lionel
MEGA
MEGA

Hello,

 

could you please be more precise and tell us exactly what do you want to do ? 😉

What do you mean by "it does not work" ? Do you have error messages ?

And also give us an example of your code please 🙂

 

 

Lionel