cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Session parameter not persisting data

TanmeyTWX
17-Peridot

Session parameter not persisting data

Hi,

I'm trying to bind "Selected State" i.e. "true" of a Checkbox to a session parameter and want to retrieve it on my next visit on the same Mashup but getting ​null ​from parameter.

On first load, State of checkbox is passed to session parameter and next visit,it will take that value from session parameter and pass to Validator to navigate but unfortunately, Validator variable "out" is recieving nothing.


Note: Session parameter is persisted while creation.

Below are is the example:

16 REPLIES 16
ankigupta
5-Regular Member
(To:TanmeyTWX)

Hi Tarun Nayyar​,

Which ThingWorx version you are on?

Also, please confirm that by Session parameter is persisted while creation. you mean that you had selected Persisted checkbox while creating property in GlobalSessionParameters?

Its TWX 7.4.

Yes I persisted it as required.

Hi Ankit,

Is it a bug in 7.4 TWX version for Checkbox state binding to session parameter?

Can you test it on your end too and let me know the results.

Then,I'll figure out some other way to perform my mashup functionality.

Thanks,

Tarun

Aanjan RaviPai Chung

ankigupta
5-Regular Member
(To:TanmeyTWX)

Tarun Nayyar​,

I will test this out and will update you.

Thank you Ankit.

I'll wait for your reply.

ankigupta
5-Regular Member
(To:TanmeyTWX)

Hi Tarun Nayyar​,

I have tested this scenario and the behavior is same for ThingWorx 7.4 and ThingWorx 7.1.9.

I will try to analyze more on Monday.

Hi Ankit,

Can you share your tested entities here?

I'll try to compare it with mine one,if its working for you.

ankigupta
5-Regular Member
(To:TanmeyTWX)

Hi Tarun Nayyar​,

I meant I was able to reproduce your issue. I can share the entities on Monday from office.

Hi Ankit,

Any sink-up on it?

ankigupta
5-Regular Member
(To:TanmeyTWX)

Hi Tarun Nayyar​,

Can you please share your entities so that I can compare it with mine. I am getting a false on Reload but you mentioned that you are receiving a null.

I created one test mashup and deleted that.

Can you share your entities,I'll try to understand the difference.

ankigupta
5-Regular Member
(To:TanmeyTWX)

Please find attached

Can't see any attachments

I guess,i didn't explain it well.

I ran your entities.It gives "false" everytime 1st mashup loads. But as per requirement,it should give false only for the first time and once user changed the state of checkbox to true,that "true" should get persisted and on next visit same mashup should get "true" from session variable,which is not the case.

ankigupta
5-Regular Member
(To:TanmeyTWX)

Tarun Nayyar​,

So, we actually need to uncheck the Persistent property so that the value resets on each login.

Also, we need to update the Session Property only when the checkbox changes.

Make the Boolean property non-persistent and try with following entities.

I hope it helps.

Thanks Ankit.

corrected my mistake.

Top Tags