Hello, having troubles making some function w...

(Michael Avenilov) #1

Hello, having troubles making some function work Date related,

hope to get some advice from you guys over here:D

I have a form for field service employees which catches information about payments and expences preformed by clients and the field managers. I need to make my DATE column to become active and editable in case the user (field manager) choeses a specific payment type - a check.

In another case, Credit card, i need the DATE automaticly be set to the 15th of the next month (managed to achieve that).

In other case, cash, leave the date as today’s date. (also no problem with this action).

My problem is to make the DATE column editable if relevant payment type is chosen… I tried to add to EDITABLE_IF: contains([payment type], ''Check") but no luck :frowning: also tried to add to the formula something like this :

contains([Тип оплаты], “Чек”), Date(today()))

also no luck :frowning:

Any chance i can achieve my goal ? :smiley:

(Marc Dillon) #2

Instead of using the contains() function, maybe just try

EDITABLE_IF = [payment type] = “Check”

(Reza Raoofi) #3

What’s [Payment type] column’s type? If it is a text column then Marc’s formula should do the job, but if it is an Enumlist type which contains a list of options, then you could use something like this in Editable_if: IN(“Check”, [Payment type])

Also regarding the other formula Contains(…, Date(today())) I didn’t understand what you were trying to achieve and where you were planning to enter that formula.

(Michael Avenilov) #4


(Reza Raoofi) #5

Ok, so do them one at a time, for now according to that picture, you are entering the formula in a column of type list. What is the column type? Enum, Enumlist, or text? Can you send a picture that shows the column definition you have entered that

[payment type] = “Check” expression in?

(Michael Avenilov) #6

@RezaRaoofi it is the [Date] column. its Date type

if i understand you correct

(Reza Raoofi) #7

I meant the previous formula that was giving the error in the picture; send a picture of its column definition; why is it list (according to the error)?

(Michael Avenilov) #8
(Michael Avenilov) #9

this is the formula in [date]

(Reza Raoofi) #10

No I did not meant this formula; you said this formula was fine and prefills [Date].

I was talking about other picture that had an error: Cannot compare list with text

[ColumnName] = “Check”

What is the column definition for [ColumnName]? Send picture that shows details of that column.

(Michael Avenilov) #11


sorry. its an enumlist

(Michael Avenilov) #12

any ideas?

(Michael Avenilov) #13

@RezaRaoofi the meaning of this sentence in your last comment: But it seems to ignore the Date table now and now showing it. although its not hidden.

after inserted the formula

IN(“Check”, [Payment type]) in Editable_if.

[date] column didnt appear anymore in the form

(Michael Avenilov) #14

@Marc_Dillon Hi, it gets me an error without the contains()

(Reza Raoofi) #15

Well, if the column type is Enumlist then my suggestion for using IN(…) function should be correct.

If the [Date] column should allow user to edit it in some cases, then write the long IFS(…) formula in Initial Value, instead of App formula; as long as there is a formula in app formula, you cannot edit that column regardless of Edit_if.

(Michael Avenilov) #16

@RezaRaoofi as always, you saved the day ! :smiley: moving the formula to Initial Value, combined with the IN condition inside Editable if did the job! many thanks again :slight_smile:

(Reza Raoofi) #17

You are welcome! :slight_smile: @Michael Avenilov

(Marc Dillon) #18

What error. What are the column types?

(Michael Avenilov) #19

@RezaRaoofi Hello, PayType is an Enum.

I tried to add the

IN(“Check”, [Payment type]) in Editable_if.

But it seems to ignore the Date table now and now showing it. although its not hidden.

About the formula , i tried to add it to this one in the [Date]:

= ifS(AND( contains([Income\Expence], “Expence”), contains([PayType], “Credit Card”)), EOMONTH(TODAY(),0)+15 , contains([Definition], “Salary”),EOMONTH(TODAY(),0)+10)

This formula decides which type of payment redirected to what date according to the chosen Definition of Payment type. AndI thought maybe to add the end of the formula the CHECK also…

(Michael Avenilov) #20