Skip to main content
Solved

FSM: How to default a date field to now

  • September 29, 2021
  • 5 replies
  • 456 views

Forum|alt.badge.img+19
  • Superhero (Employee)
  • 187 replies

Hi,

 

Specifically for contract lines I want the COVERAGE_START_DT to default to today, not the contracts start date.

 

I’ve tried setting up the default in the custom metadata to ‘now()’ or ‘today()’, but this just errors on the UI…..probably the same on the UI designer itself?

I can’t find a relevant BR or App Param, so I guess the answer would be a client script, (it’s for the web client.)

Any better answer?

Thanks

 

Best answer by GogBenbeH

I generally use a default value ‘0’ similarly to how the stock screen sets dates when the stock record is created.

 

this works well on request at least so we have a date the request actually started being created vs saved.

View original
Did this topic help you find an answer to your question?

5 replies

durette
Superhero (Customer)
Forum|alt.badge.img+19
  • Superhero (Customer)
  • 525 replies
  • September 30, 2021

Can you use the SQL expression SYSDATE?

 

Even better, in a global environment, you might want to use the site date for the user’s default site:

site_api.get_site_date(user_allowed_site_api.get_default_site)


Forum|alt.badge.img+19
  • Author
  • Superhero (Employee)
  • 187 replies
  • September 30, 2021

Thanks for the reply ‘durette’, however I think you must be using IFS APPS rather than IFS FSM.


Saranga Amaraweera
Superhero
Forum|alt.badge.img+22

Hi @nickz ,

Not entirely sure whether you could set coverage_start_dt, end_dt  with expressions on UI designer as the values are being populated them selves based on the contract and contr_product parent-child relationship defined in the fsm metadata level.

As mentioned, it would be better to give it a try by updating the field with a client script.

A value BR (with now() expression on output column)  could also be an option, but you would not see the current date in real-time (will always pick what has been mentioned in the contract.start_dt) on the screen when adding the new line. Current date will be highlighted only after saving the record.

 


Rasangi Kannangara
Do Gooder (Employee)
Forum|alt.badge.img

Hi 

 

Below are the steps I followed to get today’s date as default in any additional line included.

 

Step 1 : Go to UI Designer → Select “Coverage”

Step 2 : Select the coverage start date field from “Lines” tab

Set 3 : In the fields value → default Value → enter “Today” and save

 

Below is the test steps I did in the app.

 

After saving above changes, you can get the today’s date by default to ”Coverage start date” when adding new lines to contracts.

Thank you,

Rasangi


GogBenbeH
Do Gooder (Partner)
Forum|alt.badge.img+4
  • Do Gooder (Partner)
  • 9 replies
  • Answer
  • October 23, 2021

I generally use a default value ‘0’ similarly to how the stock screen sets dates when the stock record is created.

 

this works well on request at least so we have a date the request actually started being created vs saved.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings