Skip to main content
omj2851
February 14, 2025
Question

need expression

  • February 14, 2025
  • 6 replies
  • 0 views

How to express this statment in code format:

if ri!service is null, just return ri!service
else if ri!service ends with a period,

don't include period part, otherwise do

value for ri!service: "Any days of serious level of working after March,7,2025"

6 replies

karthikk538
February 14, 2025

if you would like to remove period use stripwith()

can you provide an example whats the input is recieved and output you are expecting?

omj2851
omj2851Author
February 14, 2025

Input is recevied as in simple text format : Any days of serious level of working after March,7,2025

output only expected:  Any days of serious level of working 

 

As the input is in text format & date or period part at the last is keep changing with every user.

so need to avoid the period part if provided by user, rest text part needed to be print.

stefanhelzle0001
February 14, 2025

What format does this "period" have? I mean, if this is just random text entered by a person, this becomes quite a challenge.

mikes0011
Brainy
February 14, 2025

if(
  right(ri!text, 1) = ".",
  left(ri!text, len(ri!text)-1),
  ri!text
)