Submitted by jnmwarren on 2019/02/20 06:59
 I have a number of 4.0.65.197_164634. I need to parse the number into the following fields: Major Ver 4.0, Minor Ver 65, Hotfix 197 Build Ver 164634. How can this be done? I tried to use the '=' sign as outlined in the documentation  to parse but nothing happened. The documentation says that when the '=' is used by placing it at the beginning it will parse the data. But what deliminator does it use? And when it does parse, how does it parse the data.

Comments

Hi !
 
By parsing, it means executing the equivalent function, such as = ThisString & ", " & ThisOtherString
 
The net result is still just one value
 
To do what you want, you could create a user-defined function for each parameter you want to extract and execute these functions in the auto-assign of the number field
If you want to go that path (it's not hard to do, and worth it if you have many to process), do not hesitate to ask for more details
 
HTH !
 
Pierre_Admin
IQ Designer
 

jnmwarren

2019/02/20 11:55

In reply to by Pierre_Admin

Yes and Please, I could use some help. I know SQL code in a very basic way but not enough to know how to setup what you are describing.

Pierre_Admin

2019/02/20 15:07

In reply to by jnmwarren

Actually, this does not require any SQL knowledge, rather some VBScript
 
In the VB Editor, This Database tab enter this function:
 
Function GetMajor(sVersion)
dim v, iTot

v=split(sVersion,".")
iTot=ubound(v)
if iTot>1 then
GetMajor=v(0)+(v(1)/10)
end if
End Function
 
Now, in your field that contains the complete version number (say VersionNumber),
enter the following Auto-assign rule: AM:[Major]=GetMajor([VersionNumber])
 
Enter / change the version number and see if the Major field gets the correct value
 
If all is well, select all the version numbers and do Edit > Touch. This will update all relevant items
 
You can try to modify the code for the other fields, of course if you need help, do not hesitate to come back
 
 
HTH !
 
Pierre_Admin
IQ Designer