Hello, having troubles making some function w...

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 also tried to add to the formula something like this :

contains([ะขะธะฟ ะพะฟะปะฐั‚ั‹], โ€œะงะตะบโ€), Date(today()))

also no luck

Any chance i can achieve my goal ?

0 23 493
23 REPLIES 23

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

EDITABLE_IF = [payment type] = โ€œCheckโ€

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.

#ERROR!

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?

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

if i understand you correct

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)?

 

this is the formula in [date]

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.

@RezaRaoofi

sorry. its an enumlist

any ideas?

@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

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

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.

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

You are welcome! @Michael Avenilov

What error. What are the column types?

@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โ€ฆ

Sounds like you have two separate goals, but you explained both in the same post, so it was confused a little bit.

Goal #1: You want to make [Date] column editable based on a condition.

my suggestion was related to this part.

Goal #2: You want to prefill [Date] column with different values again based on a condition and selected [Payment Type]

Am I right? If yes, I do not understand how it is not working, and 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.

Sorry, I mixed up with Enumlist; if [Payment Type] is Enum, then Marcโ€™s formula should work: [payment type] = โ€œCheckโ€

The above error message is complaining about IN function with wrong order of parameters I guess. Enter [payment type] = โ€œCheckโ€ in Editable_if and see what happens.

@RezaRaoofi Yes, i have mixed up two goals.

Need to prefill [date] according to a condition or [paytype] OR make [date] editable if another condition is TRUE

Top Labels in this Space