You are viewing limited content. For full access, please sign in.

Question

Question

How can I auto fill a lot of fields?

asked on April 11, 2017 Show version history

Hi all!

 

I need your help to find a way for my request.

I have a XML's file with a lot of tags

some tags are the metadata's name, some are the field's name, and we dont care the others.

How can I auto attach the rights metadatas and auto fill the rights fields from the XML?

 

Thank you for your help.

Regards

XML from pictav.jpg
0 0

Replies

replied on April 11, 2017

You need to use the Read XML activity in Workflow to parse out the data.

0 0
replied on April 11, 2017

Thank you Blake Smith,

 

This is what I did. But now I manually choose the metadata ; I want to auto program this task and I dont know how to do.

0 0
replied on April 11, 2017

After you have parsed out the values into tokens you can then use an Assign Field Values activity to populate the metadata values using the tokens you created.

0 0
replied on April 11, 2017

Actually, I'm not trying to populate the metadata ; I'm just trying to chose the right metadata.

I have 73 metadata ; some XML have 1 or more metadatas. I cant populate all my 73 metadata manually.

0 0
replied on April 13, 2017 Show version history

Hi!

 

I tried to list all tags from my xml but it looks impossible as my file is a xml (using the tool "read the xml"). The tool "read the xml" return values. Actually I dont need value, I need the tag's name. So, in my mind, I need first to change XML to something else (for example *.txt). This is what I did!

 

 

namespace WorkflowActivity.Scripting.ScriptSDK
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.SqlClient;
    using System.Text;
    using Laserfiche.RepositoryAccess;

    /// <summary>
    /// Offre une ou plusieurs méthodes qui peuvent être exécutées au moment de l'exécution de l'activité de scriptage du flux de travail.
    /// </summary>
    public class Script1 : RAScriptClass102
    {
        /// <summary>
        /// Cette méthode est exécutée quand l'activité est effectuée.
        /// </summary>
        protected override void Execute()
        {
            // Rédigez votre code ici. La propriété BoundEntryInfo accèdera à l'entrée, RASession obtiendra la section de Repository Access


            DocumentInfo docInfo = this.BoundEntryInfo as DocumentInfo;
            if (docInfo != null && docInfo.IsElectronicDocument)
            {
                this.DesignTools.Watch("Extension", docInfo.Extension);
                docInfo.Extension = "txt";
                docInfo.Save();
            }
        }
    }
}

Ok, I changed my file from XML to TXT using workflow. Using the same workflow I cant read the file TXT ; it looks like the next processus work on the original file (XML).

 

So back to square one.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.