Unique identifier for each topics in Rtd

Add-in Express™ Support Service
That's what is more important than anything else

Unique identifier for each topics in Rtd
 
Kiru Marimuthu




Posts: 38
Joined: 2017-07-20
Hi

We are using RTD server wrapped in UDF function. Some of the parameters are optional in the UDF function.

We want to distinguish the two different functions with different optional parameters.

For eg: =TESTFUN(arg1, arg2, "", "", arg3)
=TESTFUN(arg1, arg2, "", arg3, "")

We have been using Topic.Text to identify each topic but in the above scenario Topic.Text has same value "arg1arg2arg3".

Any help would be appreciated?

Thanks
Kiru
Posted 15 Oct, 2018 08:12:00 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
Hello Kiru,

Optional parameters are part of the programming language, not Excel. Excel doesn't support optional parameters. You need to analyze all the parameters passed to your function in order to find out the difference you describe.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2018 09:11:40 Top
Gavin Howard




Posts: 10
Joined: 2016-12-01
Andrei,

Can I just ask a quick clarification as to what you mean by the following:

Optional parameters are part of the programming language, not Excel. Excel doesn't support optional parameters.


It seems that there are built in functions in Excel that do have optional parameters, for example FV:
FV Func

That have two at the end. Our case is equivalent to the case where in FV 'Type' would be defined but 'Pv' is not.
Posted 15 Oct, 2018 11:02:35 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
Hello Gavin,

Gavin Howard writes:
It seems that there are built in functions in Excel that do have optional parameters, for example FV: FV Func


Ah, optional parameters may exist on a built-in function; custom functions don't have optional parameters; this is by Excel design.

Say, at https://docs.microsoft.com/en-us/office/client-developer/excel/xlfregister-form-1 they describe the method that you call to register an XLL function; the arguments that the XLL function accepts are described by a string that you pass in the pxArgumentText (xltypeStr) parameter. The format of that string doesn't provide a way to specify that a given argument is optional.

I cannot find an article describing how you specify arguments for an automation add-in.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 16 Oct, 2018 03:32:29 Top