This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A little VB Script help please?

Former Member
Former Member
I have property definitions for FirstName, Surname, and FullName.
I need the user to be able to enter the FullName in a single field, and to automatically calculate the FirstName and Surname.
I can use the automatic value 'Simple concatenating of properties' to achieve the reverse result, but presume I need to use Calculated Value(VBScript) to separate the FirstName and Surname.
I could do it easily in EXCEL but I'm not a programmer and don't know how to do it with VBScript. ???
I wonder if somebody would be kind enough to give me the code for this?
Parents
  • Former Member
    Former Member

    Can you specify in more detail how the FullName is entered. Is it e.g.


    • Firstname, Lastname

    • Firstname Lastname

    • Firstname MiddleName Lastname

    • Lastname, Firstname

    • Lastname Firstname

    • Lastname MiddleName Firstname



    Or something else? Then, based on your specification it is easier to give you the exact code that works as expected.
    We'll just do Firstname, Lastname.


    Also, have you consideted working the other way around? E.g. having separate property definitions for the FirstName and LastName? Then, it is very easy to use the simple concatenation feature to concatenate the FullName property.
    Yes, I tried that. However I need the Full Name to be set as the name for the record so that it appears in the parent record. (The parent record is class = Phone Call and the child record is class = Client) If I use the simple concatenate approach I muse choose Firstname or Lastname as the object name, but I really need the Full Name to be the object name. The aim is for the user, while adding a new phone call, to be able to add a value (e.g Client = Andy Andrews). However, we also need to retain separate Firstname and Lastname to allow for future data export.


    P.S. Also all M-Files solution providers and M-Files consultants would be more than happy to help you with your scripting needs (but this is usually for a fee)
    I understand that, and Infomatic have been extremely helpful. However, we are a small, volunteer-run, non-profit association and it is already stretching our budget to purchase M-Files. I am now retired from a career in IT (but never acquired programming skills) and have taken on the project of evaluating prospective applications (M-Files wins hands down), making the selection, and doing the implementation. I have allowed plenty of time to work my way through the learning curve.

    I realise that there may be a better way to do this that I am missing because I am very much at the beginning of a big learning curve. Always open to suggestions as to the best approach.

    Thanks for your help so far.
Reply
  • Former Member
    Former Member

    Can you specify in more detail how the FullName is entered. Is it e.g.


    • Firstname, Lastname

    • Firstname Lastname

    • Firstname MiddleName Lastname

    • Lastname, Firstname

    • Lastname Firstname

    • Lastname MiddleName Firstname



    Or something else? Then, based on your specification it is easier to give you the exact code that works as expected.
    We'll just do Firstname, Lastname.


    Also, have you consideted working the other way around? E.g. having separate property definitions for the FirstName and LastName? Then, it is very easy to use the simple concatenation feature to concatenate the FullName property.
    Yes, I tried that. However I need the Full Name to be set as the name for the record so that it appears in the parent record. (The parent record is class = Phone Call and the child record is class = Client) If I use the simple concatenate approach I muse choose Firstname or Lastname as the object name, but I really need the Full Name to be the object name. The aim is for the user, while adding a new phone call, to be able to add a value (e.g Client = Andy Andrews). However, we also need to retain separate Firstname and Lastname to allow for future data export.


    P.S. Also all M-Files solution providers and M-Files consultants would be more than happy to help you with your scripting needs (but this is usually for a fee)
    I understand that, and Infomatic have been extremely helpful. However, we are a small, volunteer-run, non-profit association and it is already stretching our budget to purchase M-Files. I am now retired from a career in IT (but never acquired programming skills) and have taken on the project of evaluating prospective applications (M-Files wins hands down), making the selection, and doing the implementation. I have allowed plenty of time to work my way through the learning curve.

    I realise that there may be a better way to do this that I am missing because I am very much at the beginning of a big learning curve. Always open to suggestions as to the best approach.

    Thanks for your help so far.
Children
No Data