Hi,
I need a clarification regarding how to write a C# code in Laserfiche Cloud workflow Because its asking for location as given below.
where that location will point. And for adding a dynamic fields for a template it points to a lookup table where the user can only import a data from a excel or csv file not from the database. Is there any way to point from the database because in our client side we have dynamic data always so we need to map it with the table from a database.
Thanks,
Vharsha
Question
Question
How to write SDK script and map dynamic fields in Laserfiche Cloud
Answer
You can use a query rule to update or insert a specific row in a lookup table.
Replies
In Laserfiche Cloud, dynamic fields can only use lookup tables.
Scripts run through locally on a remote agent machine. See documentation for more information.
Hi,
I have tried updating the lookup table through workflow but it has issue when we update it before 60 minutes I have also attached the screenshot. Is there any way to reduce the time for updating the lookup table. In our process we need immediate update on lookup table.
And we have an another issue in C# script while running the script. Please refer the below image
Replacing the entire contents of the table can only be done once an hour. Updates to individual rows are not rate limited.
Can you give us more details on why you need to replace the entire table more frequently?
Hi Miruna,
In our on-premises solution we have a LF form where the user can create or delete a client which is stored in a table were that table is mapping as dynamic fields for all the template.
so what happens is when a user creates or deletes the client it reflects for their templates but in LF Cloud we have lookup tables which can only be updated once in an hour but we need immediate update when users changes in the form, so when the user updates I would like to initiate the above workflow.
Please guide me that how to update the individual row in look up table through workflow.
You can use a query rule to update or insert a specific row in a lookup table.
Re. "signature verification fail". Verify C# script function argument and return types to be:
public static Task<IDictionary<string, object>> YourScriptAsync(IDictionary<string, object> inputs)
P.S. the method does not need to be static
Hi Miruna,
The lookup table is working great thanks,
Hi Paolo Argentieri,
How to set a Input and Output parameter in C# script rule?
and how to add the reference DLLs, Is that in visual studio NuGet packages and has some other configuration?
Hi Vharsha,
I created a sample C# project in GitHub with a simple C# rule "JoinTokensAsync" implementation example: https://github.com/Laserfiche/lf-sample-csharp-script-rules
The readme.md contains steps to try it out. Let me know if it needs further clarifications.
Hi Paolo Argentieri,
Thanks for sharing this sample code but we need to know how to pass the input and output parameter for this script.
1) In our code when a input is passed the output should return a value which is what we are not getting when executing the script in script rule.
2) Please let me know how to pass the input and output through workflow.
And had an other question in LF Cloud forms After importing the form from the on premises we have a convert form option which convert the on premises form to Cloud but when we are doing so the Java script and CSS of the on premises form is not converting. and in on premises we have an option to import the CSS file from the local C drive in the following location
C:\Program Files\Laserfiche\Laserfiche Forms\Forms\Styles
but how to integrate the CSS file in Laserfiche cloud. I have attached the image for your reference
For the form conversion, that is expected behavior. JavaScript from classic forms is not supported in modern forms. The conversion is not required though, so you can keep the forms as they are with JS.
Hi Vharsha,
To use script outputs you need to configure them in the Output section of the rule definition.
I have updated the readme for the sample C# script rules with step-by-step instruction on how to build-configure-test: https://github.com/Laserfiche/lf-sample-csharp-script-rules
For the C# script question. Remote agent worker is working under net-framework environment.
Can you try "SampleNetFrameworkProject.csproj" instead of "SampleNetCoreProject.csproj"
Hi Paolo Argentieri,
I need an other clarification in configuring the Web Services we are getting 301 error while testing for any URLs it matters. I have also attached the screenshot for your reference. Please guide me how to resolve it and the configuration guide.
And while configuring the direct share in On premises where we will get the API Key? and attached the screenshot.
Hi Team,
I would like to ask an other question that
Is there any LF Cloud space where we can host our SQL database as well as web services
instead of connecting through our remote agent for cloud?
Bcoz one of our client like to migrate to LF cloud and decommission their VMs, so we need to host the SQL and Web services in cloud