Skip to main content
14-Alexandrite
December 9, 2020
Solved

How do I write service for case sensitive ??

  • December 9, 2020
  • 2 replies
  • 2327 views

Hello,

         I want to compare database data and mashup data ,for this please suggest How do I write  JavaScript service with case sensitive ??

Thanks in advance

Best answer by Ashritha

Hi,

Following snippet can be used for the case sensitive search on infotable.

// result: INFOTABLE
var result = Resources["InfoTableFunctions"].EQFilter({
    fieldName: undefined /* STRING */,
    isCaseSensitive: undefined /* BOOLEAN */,
    t: undefined /* INFOTABLE */,
    value: undefined /* STRING */
});

 

Inputs:
fieldName: "<Name of column that needs to be compared>"
isCaseSensitive: true/false based on requirement
t: Infotable that contains data 
value: <value that needs to be compared>

2 replies

16-Pearl
December 9, 2020

Hello RM12,

 

Seeing as JavaScript is a case sensitive programming language this should be a fairly straightforward comparison of both the input parameters. One input would be the Database data and the other would be the Mashup data.

 

The service could be configured as follows:

Inputs:

Name: databaseInput, Data Type: <Desired Data Type To Compare>

Name: mashupInput, Data Type: <Desired Data Type To Compare>

Service Code:

var result = databaseInput === mashupInput;

 

Output:

Name: result, Data Type: Boolean

 

Regards,

Tyler

RM1214-AlexandriteAuthor
14-Alexandrite
December 16, 2020

not getting an proper output while entering any data it show me true value ,it should not comparing database data with case sensitive please suggest and refer below attachment 

1) Is there any other way to comparing database data with case sensitivity ?? 

2) which function is used for case sensitive for comparing database data??

Ashritha15-MoonstoneAnswer
15-Moonstone
December 17, 2020

Hi,

Following snippet can be used for the case sensitive search on infotable.

// result: INFOTABLE
var result = Resources["InfoTableFunctions"].EQFilter({
    fieldName: undefined /* STRING */,
    isCaseSensitive: undefined /* BOOLEAN */,
    t: undefined /* INFOTABLE */,
    value: undefined /* STRING */
});

 

Inputs:
fieldName: "<Name of column that needs to be compared>"
isCaseSensitive: true/false based on requirement
t: Infotable that contains data 
value: <value that needs to be compared>

Community Manager
January 4, 2021

Hi @RM12.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon