This content has been marked as final. Show 4 replies
Would the OAI transform TrueConditionalLookupDVM help here?
Failing that, you could try a two-stage transform. That is to do a ConditionalCopy on the Publish to Common View, then use LookupDVM on the subscribe side (Common View to Subscribe).
As a last resort, you could write a custom function, and use the DatabaseOperation transform to call it.
Thanx for the reply.
The TrueConditionalLookupDVM transform does (AFAIK) a DVM resolve on the value not the "expression" thus would not work here.
I also tried the "two-stage transform" but it seems to me (it also seems reasonable) that you cannot do DVM lookups on the "publish" side which is what I want.
I sopose I would rework the (CV) message to have fields for the fax/phone number (as opposed to now the array) but as there is a lot of fields and not as nice, but I sopose that would work.
As for databasetransform, is there some "simple" way to do DVM lookups using the databas transform, I have had a hard time finding information on how to do mappings and such in the docuimentation as well as how the database is organized, though I have done some reversengineering of the database to be able to get some nifty reports from them I sopose I could do the same to find the DVM tables.
In general I cant fathom why they havent produced a simple expression language as opposed to the "mapping function" as that would have been much more powerfull and easy to use.
But I think perhaps the best way to resolve this is to go with the two-faced transform. I mean make a hard limit of the possible phone/fax numbers and flatten the CV message. Then have publish side do the ConditionalCopy based on its own values. (though again, that is not "nice" design-wice :)
Do you have a finite list of 'phone' "types"?
I've just re-read you original post. Am I right in thinking that you want to look at the "type" of number first? Then based on the type, direct the result into correct target field?
The reason you want to use a DVM is too help direct the end result based on the type of number?
You can always add conditions to your conditional copy using the OR operator in the wizard.
fax=ConditionalCopy (phone[v0].number, phone[v0].type, "true", "(%phone.type% == '0050-1')OR"(%phone.type% == 'fax')OR"(%phone.type% == 'facsimile')OR"(%phone.type% == 'not_email')")
then have another mapping for the phone
phone=ConditionalCopy (phone[v0].number, phone[v0].type, "true", "(%phone.type% == '0051-1')OR"(%phone.type% == 'phone')OR"(%phone.type% == 'mobile')OR"(%phone.type% == 'cell')")
Yes, that is exactly what I want to do!
And the OR solution might actually be better then the two faced thing above. Atleast it will be less work for me or so I think. But again the problem with not using the DVM is that people in the future will assume (when they change one of the names) that changing the DVM will make the application "work" where as I will have to hardcode things in the :/
I had hoped that there was some "nice" way to do it but it seems I'll get a messy solution either way.
Thanx for all the help.