Skip to main content

Using Tokens in Display Forms

Comments

6 comments

  • Permanently deleted user

    Mick,

    I've just had our local distributor help set me up with getting a simple autocomplete search back up and running now that I've enabled security on the services.

    The task URL needed a  /query? at the end...    ie. ../ArcGIS/rest/services/mapscape/MapServer/6/query? (append this also to the Query Task Url of the queryTask activity also!)

    also the form's runtime modifiction had an assign activity added 

    form.Find(Of AutoCompleteBoxFormItem)("AutoCompleteBox1").Token = tokenString <-- this is the token generated from the 'GenerateToken' activity

    Not sure if this is 'the' way to do things, but it's working! 

    Others may have a better solution ; )

    cheers

    Gareth

     

    0
  • Permanently deleted user

    Gareth,

    Thanks for your reply.  This is a big help.  If I can hit you up for another answer, could you please let me if you simply entered "form.Find(Of AutoCompleteBoxFormItem)("AutoCompleteBox1").Token = tokenString" into the assign activity's 'vb expression' field, and used "form" for 'to'?  I can't seem to get a valid vb expression for my autocompletebox - while 'to' and 'vb expression' appear to be valid, the assign tool itself says "Cannot assign for 'system.string' to type 'Geocortex.forms.client.formdefinition' in assign activity assign"

    In the combobox, which looks for an id number I get  "Cannot assign for 'system.boolean' to type 'Geocortex.forms.client.formdefinition' in assign activity assign"

    I think I am missing something they teach in Workflow Designer 101 here, but not sure what.

    Cheers,

    Mick

    0
  • Permanently deleted user

    Thanks again Gareth,

    With your code and some help from our local distributor (your's too), I now have the runtime modification details correct and running nicely.

    I did notice that one of my workflows was missing 'Geocortex.Forms.Client.Items', which caused errors with the assign function within the runtime modification even though everything was actually correct.  Adding it to the list of imports fixed that.

    Cheers,

    Mick

     

     

    0
  • Permanently deleted user

    No worries Mick - I did not realise till afterward that you are up the road - so to speak, so apologies for that, we should keep in contact! 

    Sounds like we're going through the same trials and tribulations ; )

    Did you have to set up two tokens - client and server - as we had to? I'm currently doing some reading up on the web adapter we have installed and perhaps setting the authentication tier at the web level rather than AGS so I don't have to worry about tokens etc. Seems there's more than one way to skin a cat at 10.1, but what the best skinning approach is, is not exactly all that clear!

    cheers

    Gareth

    0
  • Permanently deleted user

    I have only used a server side token set to the servers IP address, as these workflows will only be available from within our public facing site.  Were you using a client token because you have users that are sending updates back?  Our traffic is one way only.

    We are just getting 10.1 onto our DEV machines at the moment, then loading Geocortex 3.14 so there is a whole new world of learning there.  By setting authentication at web level, are you using username and password rather than tokens?

    I will send you an email with my contact details shortly.

    Cheers,

    Mick

    0
  • Permanently deleted user
    Thanks guys. This is an old post but it is still applicable. In 2018 you just have to supply the "token" variable you build usinging "GenerateToken" to the Query Tool (easy peasy). As you point out not the same for "Forms".  This needs to be passed in runtime. Your guys code helped remind me of that! Screen shots for any future folks.

     

    _img_ alt="Leave Token Empty in Form Builder" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000k9hV&feoid=Body&refid=0EMf2000000fxbN" _/_img__img_ alt="Assign your "GenerateToken" to the proper Combobox via the Expression Editor" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000k9hV&feoid=Body&refid=0EMf2000000fxbS" _/_img_

     

     
    0

Please sign in to leave a comment.