@Adjust with 2 fields

I have searched the forum for all topics on @Adjust but can’t find what I’m looking for.

I have 2 fields. 1 date/time editable field called DatePurchased and 1 Dialog List editable field called RefreshPeriod.

The RefreshPeriod field will either be 1,3 or 6 (this is months).

I want to add the number of months selected by the user to the date that they enter in the first field. I am using the following:

@If(DatePurchased!=“”&RefreshPeriod!=“”;(@Adjust(DatePurchased;0;RefreshPeriod;0;0;0;0));“”)

When I then go to my form and fill in the date and select the number of months I get “ERROR: Field name requires a value”.

What am I doing wrong? Please help.

Subject: @Adjust with 2 fields

@Adjust is expecting a number, you need to convert your refreshperiod to a number like so:

@If(DatePurchased!=“”&RefreshPeriod!=“”;(@Adjust(DatePurchased;0;@TextToNumber(RefreshPeriod);0;0;0;0));“”)

Subject: RE: @Adjust with 2 fields

Ah fantastic, thanks Tom. It’s working perfectly now.

One of these days I’ll go on a course ;o)