0

To copy  a formula field in a formula text ?

 Hi

Is it possible to copy a formula field in a formula text ?

Thank you

10 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    I think you want to make a text field from a formula field. Yes, it's possible.

    Suppose your table is called 'Noms' and you want to create a textfield 'Name' from a formula field called 'Nameformula', you can use this formula in a BUTTON but first you need to create an empty text-field (in my example it's called 'Name'):

    ---

    for i in select Noms do

    i.Name := i.Nameformula

    end

    ---

    Note: do not translate the code, only the names of your table and the required fields.

    Steven

    • Addinsell
    • 3 yrs ago
    • Reported - view

    Thank you Steven

     

    I get this error :

     

    "A column has not been find :Name on the line 2, column 9"

     

    'Oiseaux famille genres espéces' is the name of the table

    My empty field is called 'Prem mot'

    My formula field is called 'Premier mot'

     

    45B88C55-11F7-4A6C-8C39-95F1CEABE72C

    • Addinsell
    • 3 yrs ago
    • Reported - view

    I have changes "Name" by "Nom" (i.Nom) in the formula and now all my names have been removed !

    What can I do ?

    • John_Halls
    • 3 yrs ago
    • Reported - view

    Steven told you

    Note: do not translate the code, only the names of your table and the required fields.

     

    And you said what table and fields you needed to use here

     

    'Oiseaux famille genres espéces' is the name of the table

    My empty field is called 'Prem mot'

    My formula field is called 'Premier mot'

     

    Put these together with Steven's code and it should work!

     

    Regards John

    • Addinsell
    • 3 yrs ago
    • Reported - view

    Thanks John.

    I don't understand : there below is my formula I tried before having juts changed "i.Name" by "i.Nom" but as I told I had this error :

    "A column has not been find :Name on the line 2, column 9".

    for i in select 'Oiseaux famille genres espéces' do

    i.Name := i.'Premier mot'

    end

    As you can see I just changed 'Oiseaux famille genres espéces' and 'Premier mot' from Steven's formula…

    • John_Halls
    • 3 yrs ago
    • Reported - view

    Yes, what I was trying to get you to think about was:- from this code how are you going to fill your empy field 'Prem mot'? It is not mentioned in the code, so where do you think it should go?

    • Addinsell
    • 3 yrs ago
    • Reported - view

    Ok, Thanks.

    for i in select 'Oiseaux famille genres espéces' do

    i.'Prem mot':= i.'Premier mot'

    end

    • John_Halls
    • 3 yrs ago
    • Reported - view

    Yes, well done! Did it work?

    • Addinsell
    • 3 yrs ago
    • Reported - view

    Yes ! Thanks again John.

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    Well done addinsell - we are all on a learning journey !! :-)

Content aside

  • 3 yrs agoLast active
  • 10Replies
  • 717Views