Skip to main content

I am new in Nintex and setting up some forms. In one of them I have a calculated value which shows well in the form but later, when I see the field where the value should be saved... is empty!

 

Could someone help to this desperated newbie? thanks so much

 

33i4C0D471C5982ACBE.png

 

 

 

 

Does the calculation occur only when creating a new item? If so I would suggest setting "Recalculate in Edit Mode" and "Recalculate in View Mode" to No.


do you have any other control on the form connected to the same 'Priority' list field? if so they may overwrite mutually. make sure at most one control is conntected to a list field.

 

 

make sure list field's and form control's data types are the same resp. compatible.

nintex experience quite often problems with decimal datatype, try to switch back to string data type for form control regardless of list field data type. it usually doesn't cause any issue.

 

make sure there are no errors reported on developer console


No, calculation occurs when creating a new item or when an item is edited. 

I changed also "Recalculate on View Mode" to no and still the calculation result show on the Nintex form but not in the list. 

 

Thanks anyway for your help


It was a good hint because the field name "Priority" was previously used in the list (it is a Sharepoint task list with some customization). Then I changed the field name to "score" and also the type to string but still the same issue...

I don't see any console.. I am creating and modifying the form directly from SharePoint. Should I install any additional SW?

Thanks anyway for your help.


Then I changed the field name to "score" and also the type to string but still the same issue...

have yoi changed 'priority' list field name name to 'score' or have you changed form control configuration so that you connected you to another list field named 'score'?

can you post configuration of 'score' list field?

 

 

I don't see any console.. I am creating and modifying the form directly from SharePoint. Should I install any additional SW?

no need to install anything else, that's a browser feature.

open new browser widow, press F12, switch to 'console' tab, run the the form and watch console window whther there appear any errors


I have changed the name at the field definition (from priority to score) and also the type (tried with decimal and string). Also I changed the form settings (name to score and type to decimal, integer and string). I checked the console messages and debuger (thanks for letting me know how) and I don't see any specific error that I can recognize. I posted also a printscreen about it. Here they are: 

 

46i5DB33FBEDFB8E306.png45iA9066C097B455BE5.png

 

47iE618B0796F9522D8.png48i2253AEE83CB29869.png


what about appearance settings? have you changed them anyhow?

similarly, what's the setting for 'control mode' in advanced settings? haven't you changed it to 'Display mode'?

 

if you haven't change them from defaults, then everything seems to be correct and I don't see a reason why it wouldn't work.

 

 

 

above you mentioned 'it is a Sharepoint task list with some customization'.

what are these customizations? could they overwrite values in list fields? it that kind of server-side code - could it make changes to list items without noticing that in version history?

can you enable versioning on the list and check whether anything else doesn't change the field value after you submit the form?


Solved! thanks so much for your help and I apologize for my late reply. I have been sick during couple of weeks and couldn't answer before. Now it works!!


@emha in this sequence, what do the Display and Edit settings mean? Would they affect whether the value is calculated? When I click on the Control Settings for Calculated Value the help text just says "Force control to be in Edit mode, Display mode, or set to Auto" which doesn't really help me understand what those modes are (This is also some further feedback for the Product team, the explanations used words/terms which themselves need another explanation which is not readily available or ambiguous). I want to show the calculated value but not allow the user to edit it, except indirectly through changing the end date.

 

my situation is I have a calculated value (varNumberOfDays) based on two DateTime variables (StartDate,EndDate). 

 

varNumberOfDays is equal to the formula:

DiffDays(StartDate,EndDate) 

 

but when i put a Single Line Text box on the form where the variables StartDate EndDate are, the number just remains at zero. 

 

A second question is, if the calculation yields a number which is not an integer what happens to the calculation - does it round the number, not run the calculation ? The example being the days between start and end date might be 554 divided by 365 and i get roughly 1.518.


 what do the Display and Edit settings mean?

'Control mode' setting means that you can overrule control's behaviour in different form modes (new, edit, display)

if you set control's 'Control mode' to AUTO, it will inherit the mode from form - ie. if form is in new or edit mode then control is in edit mode as well (so one can change its value). if form is in display mode, control is in display mode either (so it's just read only - one can see the value but can not change it)

if you set control's 'Control mode' to DISPLAY it breaks behavior inheritance from form mode and always render the control in DISPLAY mode, even on form in new or edit mode.

if you set control's 'Control mode' to EDIT it breaks behavior inheritance from form mode as well, but in this case control always work in edit mode. so one can change its value even on form on display mode. (note however that form in display mode do not persist any values to the list item. so value of control in EDIT mode on form in DISPLAY mode is only valid throughout the form session but never saved)

 

 

 

Would they affect whether the value is calculated? 

no this setting do not affect calculated control value recalculation.

but there are other settings that does, see "​Recalculate formula on XXXX mode" ones

 

 

 

I want to show the calculated value but not allow the user to edit it, except indirectly through changing the end date.

you need not bother with this one for calculated value controls. they are by design not editable, regardless of form mode or control mode setting.

 

 

 

but when i put a Single Line Text box on the form where the variables StartDate EndDate are, the number just remains at zero. 

check carefully definition of DateDiffDays() function. it requires Date datetype inputs passed in.

so either your StartDate and EndDate have to be date picker controls, or you have to convert string inputs to dates (see formatDate() function), or make them Date-s any other way.

 

 

 

A second question is, if the calculation yields a number which is not an integer what happens to the calculation - does it round the number

calculated value control has its quirks, but in general it shows a value how returned by formula. so if formula returns 1.518 it will show 1.518. you have little control over this by setting calculated value control data type (but really just little - I rarely set it to anything else but string)

note however the function definition "Returns the number of whole days between date1 and date2".

plus what's not mentioned in documentation, it always return difference as absolute value (positive number)

 

 

hope it make it clearer :) 

 

 

 

btw, @johnfriday13,  plaease start new questions for new problems. do not hijack other threads, especially closed ones. it's hard then to follow what problem is discussed.

 

 


Reply