Auto save - multi line text

Hi,

Just a quick question. Does anybody have or know of any configuration to auto save multi line text, agents need to entry a lot of information into multi line text and session/page expires whilst actively typing.

Susanne

Hi Susanne, welcome to the Community Forum. I’m not aware of any way to easily auto save a record, but you can certainly alter your session timeout setting. Is there a reason for having your session set to timeout so soon?

I’m advised that potentially a Custom Presenter could help your issue! Is the multi line text field alone on the page or part of a larger form? Would you want JUST that field to auto save, or the entire record?

Regards - Mark

Hi Mark

Apologises for my delay in responding, I have been on annual leave.

We are experiencing session time out and we have set the session to what we think is appropriate, when someone is entering text into 1 property the system is not recognising an active session. We have identified this on a Web Authenticated page and also on an Interface, we have increased the session expiry to 300 minutes on both and time out it still happening:

Web Authenticated is part of a longer form and the page in question has 1 mutli text and a choice property with link expiry set as 35minutes

Interface page has a multi line and a single line property

You’ve hit the nail on the head as we are looking for just the session not to expire.

Regards

Susanne

Hi, I do have a Custom multi-line text presenter that auto saves, if you still need one.

Hey @gediminas.poviliunas, I hope you’re well! :slight_smile:
I would definitely be interested in the auto save multi-line presenter if you would be willing to share it with me! :slightly_smiling_face:
Have a great day,
Meike

Ged has sent a version over, and I’m just preparing it for submission to Appshare (Many Thanks @gediminas.poviliunas).

I will share the link here once completed.

Just so you aware this will only work on existing records and not on un-saved forms.

It would be fairly easy to extend it so that it would initially create a new record and then save to it afterwards.

Hi Ged,

The issue here would be silently saving, especially where there may be some required fields left to complete. Once saved you would need to redirect to the correct context record, such that subsequent and existing data is not lost, on doing this it may provide a slightly strange experience for the user in the switch.

The prefered route would be to collect some preliminary information first on one page and then after a switch to the next page along with a save you could use your existing presenter.

Hi Adam,

Was the presenter ever submitted?

Id like a copy of that presenter too? Thanks

Me also! @Ryan.Devine - do you know if this is available please?

1 Like

Hi

I am also interested in this presenter.

1 Like

Hi all.

An alternative to the above is to apply a validator with auto-save functionality to the multi-line text field. This saves as you are typing… so will save even if the session times out. but it does normally rely on the record existing prior to the fragment loading.

Obviously if there are other required fields in the form then you may want to apply this to a field intended for temporary use and then when the form is submitted copy the value into the target field using a rule.

The code below, which should be applied within a Code Studio Validator and applied to the necessary field in the Advanced settings of the build page, works with most data types, so for instance the same validator could be used on multiple fields → however it may not support all and generally does rely on the record existing first, i.e. has a context id. The page could be used to auto create a record, this could be a temp holding record, that could then be copied into the main record on form submission, etc.. There are probably a number of approaches, but the validator code here is useful and could potentially help resolve your issues.

if(debug) cs.log('Validator: Auto Save Current Field Value');
        
		let value = fragment_presenter.get_value(); // this is the current value entered by the user.
		let targetRecord = fragment_presenter.get_base_record_id(); // this is the record id of the field
		let fragmentSelector = fragment_presenter.get_selector(); // this is the field path

		if(debug) {
			cs.log('Value: ' + value);
			cs.log('targetRecord: ' + targetRecord);
			cs.log('fragment selector...');
			cs.log(fragmentSelector);
		}

		let rec = cs.record(targetRecord);
		rec.set(fragmentSelector, value);

		return true;