I'm currently passing emailaddresses in each line but when i submit it is storing values as test@test.com;test2@test.com but it has tostore in db as in new line and it has to be passed to an integration as {"test@test.com,test2@test.com"} Can someone please help
Discussion posts and replies are publicly visible
What is the reason to to store the email address in new line is db? If db has data as 'test@test.com;test2@test.com' then you can format the data from db like below before sending to integration.
joinarray(split("test@test.com;test2@test.com", ";"),",")
I need to compare the entered emails vs integration API emails so that I need to display the missing mails from integration on the UI as invalid emails.Since in DB it is storing as the below formatted the integration is not returning the invalid emails properly . Please help in resolving the issue
yes the value local!formattedEmailString abc@test.com,abc@test.com,abc@test.com yes integrations is in PM.In postman if i test with comma separated data it will work (abc@test.com,abc@test.com,abc@test.com )
These are emails were passed to that API
Is this EmailPV a multiple type process variable? Can you try changing it to single and pass the values from local!formattedEmailString to the corresponding rule input and thus pv EmailPV?
yes
It is taking the value as null for formattedEmailString and API is returning error as
I'm trying to save formattedEmailStrings into a!save(ri!FormattedEmails,local!formattedEmailString), .. I need to pass this data to integration but value is getting passed as NULL
Can you open the expression editor here and verify its not wrapping variable into "". If you see others don't have = signs in the value column except last two. EVen there one is a pv so the last one you should check and map to pv appropriately.
I changed it but still I'm getting value as null
It is updating in the rule input
Can you try to remove the user input task and add it can. Redo the configurations and see if it works! Till this stage the configurations looks right so it is weird for the rule input to not pass the data into pv. So give it a try
I did tried it but it is not working . I have given the values in the edit processmodel to see if it works and it worked . That means values are not getting passed from interface to PV. can you please suggest
hi Zainab! in the earlier code you shared I see you have done submit:true() for the Submit button. It means when this form submits the process will continue after the UI node.
then in saveinto you are doing start-process as well. Its not a good design.can you share the current code for Submit button widget. Also summarise the functioning of your main process as well as this start process. What are you trying to do here
In the interface we will be entering emailaddress in per line format and then it will passed to the API . If we have any missing emailaddress from API response then displaying on UI
You will have one process model which is calling this interface. So when you submit the form completes and that process model resumes. So one is your parent process. Next you are starting the cons!GASR_WRITE_REQUESTS process model. This has a process parameter Emails to which you are assignign the local!formattedEmailString.
First question is what is this process model doing -cons!GASR_WRITE_REQUESTS?
Next, assuming the parent process has a pv!FormattedEmails - are other cdt fields getting updated properly in the parent process?
On the site on homescreen , I will happen a button called "New Request" (it will trigger the processmodel "writeRequest" ).when I click on that it will redirect to emailaddress form where we will entering emailaddresses to pass to the API . This code is to pass the value to the integration in PM
ZAINAB said:a!startProcess( processmodel:cons!GASR_WRITE_REQUESTS, processParameters: { Emails:local!formattedEmailString, },
If the "New Request" button will trigger the process model GASR_WRITE_REQUESTS you should remove this code block from your submit button's saveInto code.
then how can i pass value to the integration ?
submit is true for your button. when you click submit the process will get data from rule inputs and proceed ahead. you dont need additional start process smart service here. our current interface where you input email address and has that error field in a user input task in the same process right - GASR_WRITE_REQUESTS ?
Thank you so much Harsha Sharma for helping me out.
Were you able to resolve the issue?
yes , there was issue with variables and it is resolved now .once again thanks alot.