ASNET_MCummins

Formatting and Adjusting Numbers

Discussion created by ASNET_MCummins on Jul 3, 2018
Latest reply on Jul 30, 2018 by ChristofN

I have some Actions on a Save button Behavior for a new form.

 

After "Save Form" I have a "Update List Item".

 

My List item ID is 

 

=[[@Web.GetFirstValueForQuery('Purchase Orders', '<Where><Eq><FieldRef Name=Author LookupId=True  /><Value Type=User ><UserID/></Value></Eq></Where><OrderBy><FieldRef Name=Created Ascending=False /></OrderBy>', 'ID')]]

 

...and I then assemble a PO Number

 

[[For_Vessel.Vessel_Initials]]-[[ID]]

 

This works fine and gives me a Purchase Order Number like "HA-12"

 

I'd like to format the [[ID]] so it looks something more like "HA-00012", and ideally, add a specified value, such as "1000" so I can have "HA-01012" and make it compatible with the client's present numbering system.

 

How would I write the expression for that?

Outcomes