0

Error in a formula ?

Hi

 

I have this formula with a button :

 

let t := "";

for i in (select 'Oiseaux famille genres espéces') order by 'Premier mot' do

   if t = i.'Premier mot' then

      i.('Premier mot':= "xxx")

   else

      t := i.'Premier mot'

   end

end;

delete (select 'Oiseaux famille genres espéces')['Premier mot'= "xxx"]

 

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

'Premier mot' is the name of the field

 

I get this error :

 

"This column is not a single data field : Premier mot on the line 4, column 24"

50F15597-B90D-4518-9627-09C5BAF72D2D

Could someone help ?

Thanks

5 replies

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

    'Premier mot' is a formula field, you can't put data in it.

    Steven

    • saddinsell
    • 3 yrs ago
    • Reported - view

    Thank you Steven.

    is there a way to change a formula field into a single field or better into a copy single field ?

    • Fred
    • 3 yrs ago
    • Reported - view

    No way to change field types, i.e can't change from formula to text or date to number. You have to create a new field and point any formulas to the new field.

     

    Not sure what you mean by "copy single field?"

    • saddinsell
    • 3 yrs ago
    • Reported - view

    Thank you Fred.

    What do you mean by "You have to create a new field and point any formulas to the new field." ?

    Can you show an example ?

    • Fred
    • 3 yrs ago
    • Reported - view

    You have a formula field called 'Premier mot'. So you have to create a new text field called 'new Premier mot' or rename the formula one to 'oldPremier mot' and call the new one 'Premier mot'. Whatever you want to do.

     

    Then go back to the formula you posted and change any reference to the new name 'new Premier mot' in your formula or whatever you decide to call it.

Content aside

  • 3 yrs agoLast active
  • 5Replies
  • 369Views