Improve MaaS (SMAX) Connect IT connector

Idea ID 1676286

Improve MaaS (SMAX) Connect IT connector

Hello,

 

When using SMAX connector in SMAX, the connector call SMAX Web Service, in that connector we can see the fields available in the SMAX table chose, but for entity link we can only fill ID of the record we want to use.

It's not possible to reference a record by another value, like a code.

By example, if we create a user, to set the location we need to put the ID of the location of the location table, it's not possible to find the location by its name or code.

Having that possibility would improve a lot the use of that connector in CIT.

 

Thank you

Tags (1)
7 Comments
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

We are working right now on improving Connect IT to dynamically query the SMAX backend to calculate the SMAX records Id in the mapping script. We will enhance the PifQueryfromFormat function to allow to query the SMAX backend.

This will help to e.g. correctly reference the record Ids to correctly create the links between records.

We plan to release this Connect IT version very soon.

Regards,

Outstanding Contributor.
Outstanding Contributor.

Thank you, it will help a lot 🙂

Micro Focus Contributor
Micro Focus Contributor
Status changed to: Waiting for Votes

this idea is now open for votes.  please provide your insights, questions, or other considerations

Micro Focus Contributor
Micro Focus Contributor
Status changed to: Waiting for Votes

this idea is now open for votes.  please provide your insights, questions, or other considerations

Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
Status changed to: Already Offered

This has been supported since CIT 9.80 P2

Member..
Member..

Hi Team,

Did anyone used this PifQueryfromFormat  function to get ID of the record by doing query in CIT. I am trying but its not working.  I can see the function which is added in CIT 9.80 P2 is "pifNewQueryFromFmtName". I got this from release notes of CIT 9.80 P2.

I am trying to create pifNewQueryFromFmtName function but its not working. Can someone guide me how to use below function in connect

Function PifNewQueryFromFmtName(strCntrName As String, strFmtName As String, strLayer As String) As Long

 

Anyone having screenshot of connect-IT , please share help. Thanks in advance

Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi,

you can use the example I documented below. This works fine.

'================================================================================
' Function to query the SMAX database for additional data

' Parameters:
' sConnector - The name of connector to which the query is performed
' sDocumentType - The document type in the Produced Document Type section of the Connector to get data from
' sQuery - The Query to execute against the document type; the function below only supports queries which return ONE value. Query need to follow SMAX REST query syntax.
' sRetField - The return field value from SMAX. For sample, to get the Id field of the Location entity, pass 'Location(0).properties.Id' for this parameter
'================================================================================

Function getSMAXData(sConnector as String, sDocumentType as String, sQuery as String, sRetField as String) as String

Dim lHandle as Long
Dim lRc as Long
Dim sRetValue as String
sRetValue = ""

'query the system
lHandle = pifNewQueryFromFmtName(sConnector, sDocumentType, sQuery)
lRc = pifQueryNext(lHandle)
If lRc = 0 then
sRetValue = pifQueryGetStringVal(lHandle, sRetField)
else
sRetValue = ""
End if

PiflogInfoMsg ("SM to SMAX - Function getSMAXData; Connector: " & sConnector & " Document Type: " & sDocumentType & " Query: " & sQuery & " Return value: " & sRetValue )
lRc = pifQueryClose(lHandle)
getSMAXData = sRetValue

End Function

 

Now call this function from the mapping. The example below, will return the Location ID from a SMAX location.

Retval = getSMAXData("SMAX EMS DataQuery Connector", "locationQuery", "Name='"&[Location]&"'", "Location(0).properties.id")

A full example:

1. The query connector is important

JanSteube_0-1587193326160.png

2. the document types of the query connector

JanSteube_3-1587193504236.png

 

3. the script (from above, as global function

JanSteube_1-1587193389067.png

 

4. the function call in the mapping

JanSteube_2-1587193444138.png

 

Hope this helps. 

Regards,

 

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.