Composite SmartObject input parameter

  • 12 November 2014
  • 6 replies
  • 2 views

Badge +1

Hi, I need some help. I'm new to SmartObjects and using them in SmartForms so maybe this is common and I don't know how...

 

I'm creating a composite SO.  I can't link the two together without doing some text conversions on one field of the SO to use it on the second SO - there doesn't appear to be a way to do it. Believe me, there is no way to join the two SO's without some sort of conversion. How is this done? (see attachment)

 

Another possible solution is to create a dataitem when the smartform loads and pass that to the SO. I don't know how to do that either!

 

More background: our AD2 object looks up by the system variable 'name' - so "<Domain>/<employeeID>" or just "<employeeID>" work to look it up. The second lookup is on our own AD lookup (SearchLDAP). It will only take <EmployeeID> (no domain). BUT - the AD2 doesn't have an EmployeeID-only field to use. I could start with SearchLDAP if I could strip off the <Domain> from the system variable.  

 

Any help would be greatly appreciated!


14941i4D6CA8DD4F8228E3.jpg
12416iCF5F7F8AC5ECE928.jpg

6 replies

Badge +10

Hey MarkMcC,

 

I believe the secret sauce you require would be inline functions.

 

http://help.k2.com/onlinehelp/k2blackpearl/userguide/current/webframe.html#Inline_Functions_Overview.html

 

Some simple regex to rip off everything before the / character should do nicley here.

 

Regards,

 

Mike

Badge +1

Thanks for the quick reply Mike. I would agree except there isn't any way to call an inline function from the smartobject menu! That functionality is totally missing. All that is available is system variables.

Badge +10

MarkMcC,

 

Yes, that's correct, you cannot do it from the associations screen.  I've been thinking about this for a minute here and playing around in my VM, and I think there might be more than one way to skin a potato.  These are off the top of my head, and I have not tried to implement them with any sort of vigor, so your mileage may vary.

 

1.  Edit the AD smartobject, add an additional field that mirrors EmployeeID with the inline function you require. 

2.  Edit the AD smartobject, add a method that returns the value of EmployeeID with the inline function you require.

Yeah, neither of those really gave me what I was looking for.

 

This association you require, is it nessacary that it be reflected in the smartobject associations?  What is the desired end result here?

 

 Regards,

 

Mike

Badge +1

Yeah, and changing the original SO isn't really an option right now.

Badge +10

MarkMcC,

 

Only thought I have, if the intended result here is to associate the two smartobjects through a smartform, would be to load the view for AD SO, then "transfer data" from one view to the other, do your inline function regex, then execute the load method for the second view based on that value...

 

If the association is 100% required between the two smartobjects, then that is a bit more of a quandary...

 

Let me know what the use case is.

 

Regards,

 

Mike

Userlevel 4
Badge +13

Hi MarkMcC


 


Please have a look at the following article indicating how to create and work with composite SmartObjects.


http://help.k2.com/kb001304


 


Kind Regards


Raymond

Reply