Skip to main content
Nintex Community Menu Bar

Hello, 

 

I am trying to create a reference to a smart object in a smart form. Currently i only have one entry in the smart object, so the ID reference is just 1. I am wanting the smart object to be updated regularly by others and then displaying this information into the smart form, so they can see the information before submitting a request. My main issue is that i can not figure out how to make the ID reference to be the most recent update to the smart object (e.g. if i had updated the smart object 3 times the refernece would be 3). 

 

Is there any way for me to be able to do this? Would greatly appreciate any assistance. 

 

Thanks! 

Hello ablackman,

In your "Create" rule, on your output mappings, ensure that the ID on your right hand side of the canvas is dragged onto the smartform control on your left hand side of the canvas. This gets the recent item in the smartobject.

If you find this helpful in resolving your issue, please mark it as such by "Mark As A Solution" or "Kudo" as it will be of help to other members of the community who encounter similar issues.

Regards,
Katleho

Hi;

 

In addition to what kat says ,Id IN your smartObject should be auto-increment ,please check out with this link on howtos:-https://help.k2.com/onlinehelp/K2Five/UserGuide/5.1/default.htm#Tutorials/Build/LeaveRequestExtended/10SaveManagerChanges.htm

 

regards;

widson.


Hello, thanks for responding. 

 

I am a bit confused about where i am supposed to be doing this. Currently in my form, i have edited the rule "when the form is initializing," i added the ryle "then on __ View execute the load method" and i configured it to have the number beside the ID, in the input mappings screen. If i change this ID to the views ID mapping when the form is being run it states "the followng fields are rquired: - ID" and doesnt load anything into that particular view. 

 

I looked in the output mappings part of this rule and there is no where to map the ID, only the individual controls. 

 

If you could please explain your solution i would grealty appreciate it. 

 

Thanks


Hello Ablackman

 

When you create a smartobject, there should always be a ID field which is set to "auto increment" not "number". This ID is generated each time you "Create" a record and increments by 1. E.g When you submit a form for the first time, ID will be 1. When you submit a form later, ID will be 2 and when you submit another form the following day, the ID will be 3.

 

So if you want the other users to update the information for the latest record (ID = 3), in your input mappings you must place ID under smartobject into ID on your mappings.

 

When form initialized, load smartobject:

 

 

 

 

 

 

 

 

 

If I dont make any sense, can you perhaps attach your rules, just to understand your issue more. 

 

Thanks,

Katleho


Hello, 

 

Thanks for the response. I already knew how to do what you were saying. It still doesn't work and i think i know why. 

I do not think i am not explaining properly what i am trying to do. I have a form (lets call it form a) which contains a few different views (a,b,c,d) and they don't all have the same smart object attached. I have a form b (with view b, which has a different smart object than views a,c and d) at the moment which is filled out by a higher member with some specific information. I am then trying to load this "view b" information into form a and i want it to be showing the most recently updated information that was filled out by the previous form b. If i put the smart object ID reference, like you have previously stated, an error comes up when trying to fill out form a saying something along the lines of "the following field is required - ID" and does not display anything into the view. This is because i am not telling it which ID number to load the data from. 

 

So my issue is, i need a way that will load the most recent ID number for that particular smart object, when this is unknown. Yes it is an incremental number so it will be the largest ID number in that smart object. 

 

Thanks, 

Amber


Hi Ablackman,

 

For some reason, error "The following field is required-ID" usually occurs when we use many views on a single form even though the IDs are referenced/mapped correctly. To resolve it, I used the rule "Execute a method on the View" instead of "Execute a SmartObject Method" on all my views. See below image: 

 

 

 

 

 

 

In your case, I think everything is mapped correctly as you also mentioned. And the only thing giving you issues now is this error message.Correct?  

If correct, lets try to do the following: On all your views (a,b,c,d), use the "Execute method on the view" as highlighted on the image for your (Create/Save/Delete/Load) methods.

 

After applying these changes, try to run form a and please provide me with feedback on if you receive the same error and if the relevant information as updated on form b shows.

 

Reference:

https://community.k2.com/t5/General/SmartObject-Property-ID-is-a-required-property-for-selected/m-p/108939#M4682

 

Thanks,

Katleho


Hello, 

 

Thank you for replying again. I appreciate the help alot. 

 

Sadly i already have all my views individually executing their own view methods rather than using the smart object method, so that is also not the issue here.

 

I have figured out how to load the most recent smart object data into the workflow, when i am doing the create a reference step. What i do there is i get the "Get List" ID from the Smart Objects Context Browser and tell it to return the last entry. The only issue is that in the views rules there is no option to pull this "Get List" ID and then tell it to return the last entry, it only allows me to pull just the ID alone. 

 

Thank you


Reply