Use iLogic to check for user parameter, create it, populate it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to get some simple iLogic code to run and I could use some (probably very basic) help.
Essentially, I need to complete my If/Then statement to do the functions in my comment quotes below. I basically want to check for a parameter named 'PartNumber' in any existing document in which the user opens (and clicks 'Save' or updates iProperties). If it exists, I want to assign it the 'MFPN' variable value (taken from the iProperties). If it does not exist, I want to create it, then assign the 'MFPN' variable value to it.
Any help is appreciated greatly. The simpler the solution the better, as I am very novice at understanding and/or maintaining programming code.
Here's what I have...
iProperties.Value("Project", "Part Number") = ThisDoc.FileName(False) 'without extension
MFPN = iProperties.Value("Project", "Part Number")
If My_Expression Then
'If "PartNumber" parameter exists in this file, populate it with MFPN variable
Else
'If "PartNumber" parameter does not exist, create it, then populate it with MFPN variable
End If
iLogicVb.UpdateWhenDone = True