Skip to main content

Hello,

I am puzzled in a quite common scenario. I have CreditCard Smart Objects. I need to show the list of CreditCard objects and let the end user activate or deactivate any of the CreditCards via a checkbox, then let him or her submit the form. But this simple scenario looks a bit challenging

 In my infopath form there is a Secondary Data Source (as a smart object method) to Get List of CreditCard objects. It works fine If I directly use this Secondary Data Source SmartObject as a Repeating Table. But then I lose the ability to track if end user checks unchecks IsActive checkbox(which is a boolean property of smartobject). Since those fields on the repeating table does not belong to infopath xml nor to process data but they belong to secondary data source. Thus I lose track of them once the form is submitted.

 

If I create a repeating group and put fields into it (one field for each property of creditcard smartobject) I can't seem to populate these fields in a repeated way. Only first credit card is visible.

 Does anyone know a solution ?

what about creating a rule for the IsActive box that executes an update statement against the Smart Object when the value is changed?
the problem is I want the changes reflected at the end of the process. If I go and update the isactive checkbox now , that is a no no in my process. The cards should be activated at the end of the process. This is why I am trying find a way out to carry on this data within the process

Hello all.

reverseblade , how did you manage to solve this problem?
What I did is writing custom code within the InfoPath form to iterate over the secondary datasource and add the xml nodes accodingly in the main datasource.
I am planning to move this code to the K2 process, this should eliminate the need to set the InfoPath form to full trust.


I am wondering if there is a simpler solution.


Regards.


A simpler alternative to the code that worked for me is to add a SmartObject event in the process and to map the GetList method return fields to the process xml repeating fields.

This works great if all fields are of text type, however it generates an exception when the IP field type is numeric


Reply