I have a excel file where there are too columns one is constant name and another is constant value .I need to upload a the file in an interface using file upload component and after clicking a submit button in the interface i need to fetch the data in the excel and update the constant values for respected constants . will anyone please guide me to achieve this scenario ?I have also given the snap of the excel sheet ,please find that below.
Thanks in advance !
Discussion posts and replies are publicly visible
what the scenario is , I will check for a constant if it is there in my application or not . If there is no constant then create a new one .
how to achieve this ?
Yeah, I can understand that and I don't think so that any smart service is there to create constant.
I don't know whether this will work - the Update Constant Smart Service requires a reference to the constant, I don't think you can use a Constant Name instead.
Edit: sorry I was wrong. The smart service also accepts the constant's ID (as in, its integer-based environment-specific object ID, similar to a Process Model ID).
Getting the Constant's ID isn't super easy though - you have to use "get constant or rule UUID by name", then the "get content object details by UUID" function and extract the "ID". The quick-and-dirty expression, which could go directly in the "constant" field of the Update Constant smart service, could look like this:
extract( getcontentdetailsbyuuid( getconstantorruleuuidbyname("MY_CONSTANT_NAME")), "Id: ", ", Parent:")
You'd simply replace "MY_CONSTANT_NAME" with the actual constant name. You'd need to be sure the constant name actually exists, otherwise I expect the node would error.
(If anyone has an easier way to do this, i'd love to hear it.)
It is saying an error , Can you please guide me where i am missing anything ?
That's because you are trying to read a document which is not yet stored in Appian ,Initially it's gonna get stored in Temporary folder . Have a look into my reply where i explained how to read a document in the same interface.
venkat Avuluri said:where you gonna upload a File , use SubmitUploadedFiles
in this screenshot the file has just been uploaded but is not yet Submitted into the system. you'd need to submit it (usually via submitting the form in a process task), and only then call "read excel sheet" on it. some of this was already explained in earlier replies.
what if I want the form as a process start form ?
bisheswar01 said:what if I want the form as a process start form ?
Then you need to submit the form first before attempting to read the contents of the uploaded file. This is easy enough to do - just make it 2 separate forms; the upload on the start form, and the output on the subsequent User Input Task.
Thanks a lot Mike Schmitt .It really helped me a lot and also learnt a new thing .