cancel
Showing results for 
Search instead for 
Did you mean: 

How to Bind new OData service assigned to Adobe form with Adobe Livecycle designer ?

jatin_singhal
Participant

Hi All,

We are printing Invoices using Adobe forms. Some changes were required in the form hence we made some changes in the OData service assigned to the form but unfortunately the service got corrupted and then afterwards we created a copy of the service from Production with some different name in Dev. We have assigned New Service in the form. Service and classes are active and form is also getting printed. But data is not coming in the form.

Can you please help here what is missing.

We have done below Analysis

i) Binding we have checked the name is same $.EntityName.Fielname.

ii) We have also downloaded and uploaded .XDP file. Have checked the Callback class, there also our service is getting called.

iii) One more thing in the class we can see all the data the only thing is it is not getting transferred to the form.

Your help in this regard will be highly appreciated.

View Entire Topic
former_member187605
Active Contributor

You cannot solve this in a custom function, because a DS function returns a single value only.

You can solve that by writing Python code in a User_Defined transform.

Or map all output columns individually in a Query transform:

  • Col1: substr(source_column, 1, 132)
  • Col1: substr(source_column, 133, 132)
  • Col1: substr(source_column, 265, 132)
  • ...

No need for any ifthenelses. If the starting position is higher than the source_column length, the result will be null. If the length of the segment is less than 132, only the existing content is copied.

sksaxena
Participant
0 Kudos

Firstly, Thanks a lot Dirk for sharing your immense knowledge in solutions.

There's extension to this scenario. Request you to please help.

1. For example input string is of 200 characters. In First segment of 132 characters, if last word is getting cut i.e last word is getting few characters missed, then it must be considered as starting word of next segment. It should not come in first segment then i.e. first segment length will be less than 132 characters in this case. This should be taken care in all output columns.

2. Is there any way in BODS, where we can make this dynamic? I mean no fix output columns. If source string length is 600 characters, then it generates output in 5 columns, if it is 700 characters then 6 columns and so on. I mean otherwise, how to certain the no. of output columns? If I define column mappings for 5 columns today and next time a bigger input comes, then it's a problem. Can we generate the output structure dynamically depending on input?

It's urgent. Your help is deeply appreciable.

former_member187605
Active Contributor
0 Kudos
  1. Can be solved with a custom function. Look for the last space in the first 132-character segment. Replace that space by a character that doesn't exist in your texts,e.g. µ. Take the next 132-character segment, starting from the µ-position + 1, look for the last space and replace... Repeat this process until you reach the end of the string..
    Return the string with spaces replaced by µ's.
    Then use word_ext(source_column, 1, '`'), word_ext(source_column, 2, '`')... to map to the output fields.
  2. This cannot be made dynamic. You know your max string length is 8000, correct? Then go for e.g. 80 columns to be on the safe side.
    If you don't want to store all those nulls, consider pivoting your data and filter out the null rows.
sksaxena
Participant
0 Kudos

Hi Dirk,

Point no.2 is clear. However, Can you please elaborate point no.1? How can we implement it?

I tried, but not getting it.

Thanks

former_member187605
Active Contributor